From 3871bb2a11b03885f45d35e20bab3f321d9578dd Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 9 May 2024 12:39:36 -0400 Subject: [PATCH] Springer Link: Support new book chapter list structure Fixes #3302 --- Springer Link.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Springer Link.js b/Springer Link.js index 3321f5755f..8062ce1b6a 100644 --- a/Springer Link.js +++ b/Springer Link.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-11 17:59:13" + "lastUpdated": "2024-05-09 16:39:27" } /* @@ -89,6 +89,11 @@ function getResultList(doc) { if (!results.length) { results = doc.querySelectorAll('li[data-test="chapter"] h4.c-card__title > a, li[data-test="chapter"] h3.c-card__title > a'); } + // https://link.springer.com/book/10.1007/978-3-476-05742-6 + // https://link.springer.com/book/10.1007/978-3-319-63324-4 + if (!results.length) { + results = doc.querySelectorAll('li[data-test="chapter"] [data-test^="chapter-title"] > a'); + } // https://link.springer.com/journal/11192/volumes-and-issues/129-1 if (!results.length) { results = doc.querySelectorAll('section ol article.c-card-open h3 > a'); @@ -647,6 +652,16 @@ var testCases = [ "type": "web", "url": "https://link.springer.com/journal/10473/volumes-and-issues/44-3", "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-319-63324-4", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-476-05742-6", + "items": "multiple" } ] /** END TEST CASES **/