diff --git a/.ci/pull-request-check/check-pull-request.sh b/.ci/pull-request-check/check-pull-request.sh index 4281e5d205..8f30cca0cb 100755 --- a/.ci/pull-request-check/check-pull-request.sh +++ b/.ci/pull-request-check/check-pull-request.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -euo pipefail +echo "::group::Setup" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$( dirname "$DIR" )" @@ -33,6 +34,7 @@ export CHROME_EXTENSION_KEY="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDllBS5q+Z9T9t cd .. npm explore chromedriver -- npm run install --detect_chromedriver_version +echo "::endgroup::" get_translators_to_check ./selenium-test.js "$TRANSLATORS_TO_CHECK" diff --git a/.ci/pull-request-check/selenium-test.js b/.ci/pull-request-check/selenium-test.js index e9a517b2e3..6c475539c2 100755 --- a/.ci/pull-request-check/selenium-test.js +++ b/.ci/pull-request-check/selenium-test.js @@ -110,6 +110,7 @@ var allPassed = false; driver = new selenium.Builder() .forBrowser('chrome') .setChromeOptions(options) + .setCapability('goog:loggingPrefs', { browser: 'ALL' }) .build(); // We got the test URL, let's test @@ -118,6 +119,7 @@ var allPassed = false; await new Promise((resolve) => setTimeout(() => resolve(driver.get(testUrl)), 500)); await driver.wait(until.elementLocated({id: 'translator-tests-complete'}), 30*60*1000); testResults = await driver.executeScript('return window.seleniumOutput'); + console.log(await driver.manage().logs().get(selenium.logging.Type.BROWSER)) allPassed = report(testResults); } diff --git a/Amazon.js b/Amazon.js index c1fedd6b25..7c7cdb0a99 100644 --- a/Amazon.js +++ b/Amazon.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-12-15 05:18:20" + "lastUpdated": "2024-07-16 18:51:09" } function detectWeb(doc, _url) { @@ -464,56 +464,15 @@ function scrape(doc, url) { } } - /** BEGIN TEST CASES **/ var testCases = [ - { - "type": "web", - "url": "https://www.amazon.com/Test-William-Sleator/dp/0810989891/ref=sr_1_1?ie=UTF8&qid=1308010556&sr=8-1", - "items": [ - { - "itemType": "book", - "title": "Test", - "creators": [ - { - "firstName": "William", - "lastName": "Sleator", - "creatorType": "author" - } - ], - "date": "2010-04-01", - "ISBN": "9780810989894", - "abstractNote": "Now in paperback! Pass, and have it made. Fail, and suffer the consequences. A master of teen thrillers tests readers’ courage in an edge-of-your-seat novel that echoes the fears of exam-takers everywhere. Ann, a teenage girl living in the security-obsessed, elitist United States of the very near future, is threatened on her way home from school by a mysterious man on a black motorcycle. Soon she and a new friend are caught up in a vast conspiracy of greed involving the mega-wealthy owner of a school testing company. Students who pass his test have it made; those who don’t, disappear . . . or worse. Will Ann be next? For all those who suspect standardized tests are an evil conspiracy, here’s a thriller that really satisfies! Praise for Test “Fast-paced with short chapters that end in cliff-hangers . . . good read for moderately reluctant readers. Teens will be able to draw comparisons to contemporary society’s shift toward standardized testing and ecological concerns, and are sure to appreciate the spoofs on NCLB.” ―School Library Journal “Part mystery, part action thriller, part romance . . . environmental and political overtones . . . fast pace and unique blend of genres holds attraction for younger teen readers.” ―Booklist", - "edition": "Reprint edition", - "language": "English", - "libraryCatalog": "Amazon", - "numPages": 320, - "publisher": "Amulet Paperbacks", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.com/s?k=foot&i=stripbooks&x=0&y=0&ref=nb_sb_noss", - "items": "multiple" - }, { "type": "web", "url": "https://www.amazon.com/Loveless-My-Bloody-Valentine/dp/B000002LRJ/ref=ntt_mus_ep_dpi_1", "items": [ { "itemType": "audioRecording", - "title": "Loveless", + "title": "Wrong", "creators": [ { "lastName": "My Bloody Valentine", @@ -537,506 +496,6 @@ var testCases = [ "seeAlso": [] } ] - }, - { - "type": "web", - "url": "https://www.amazon.com/s?k=The+Harvard+Concise+Dictionary+of+Music+and+Musicians&Go=o", - "items": "multiple" - }, - { - "type": "web", - "url": "https://www.amazon.com/Adaptation-Superbit-Collection-Nicholas-Cage/dp/B00005JLRE/ref=sr_1_1?ie=UTF8&qid=1309683150&sr=8-1", - "items": [ - { - "itemType": "videoRecording", - "title": "Adaptation", - "creators": [ - { - "firstName": "Nicolas", - "lastName": "Cage", - "creatorType": "castMember" - }, - { - "firstName": "Tilda", - "lastName": "Swinton", - "creatorType": "castMember" - }, - { - "firstName": "Meryl", - "lastName": "Streep", - "creatorType": "castMember" - }, - { - "firstName": "Chris", - "lastName": "Cooper", - "creatorType": "castMember" - }, - { - "firstName": "Maggie", - "lastName": "Gyllenhaal", - "creatorType": "castMember" - }, - { - "firstName": "Spike", - "lastName": "Jonze", - "creatorType": "director" - }, - { - "firstName": "Vincent", - "lastName": "Landay", - "creatorType": "producer" - }, - { - "firstName": "Jonathan", - "lastName": "Demme", - "creatorType": "producer" - }, - { - "firstName": "Ed", - "lastName": "Saxon", - "creatorType": "producer" - } - ], - "date": "May 20, 2003", - "language": "English (Dolby Digital 2.0 Surround), English (Dolby Digital 5.1), English (DTS 5.1), French (Dolby Digital 5.1), Unqualified (DTS ES 6.1)", - "libraryCatalog": "Amazon", - "runningTime": "1 hour and 55 minutes", - "studio": "Sony Pictures Home Entertainment", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.fr/Candide-Fran%C3%A7ois-Marie-Voltaire-Arouet-dit/dp/2035866014/ref=sr_1_2?s=books&ie=UTF8&qid=1362329827&sr=1-2", - "items": [ - { - "itemType": "book", - "title": "Candide", - "creators": [ - { - "firstName": "", - "lastName": "Voltaire", - "creatorType": "author" - } - ], - "date": "2011", - "ISBN": "9782035866011", - "abstractNote": "Que signifie ce nom \"Candide\" : innocence de celui qui ne connaît pas le mal ou illusion du naïf qui n'a pas fait l'expérience du monde ? Voltaire joue en 1759, après le tremblement de terre de Lisbonne, sur ce double sens. Il nous fait partager les épreuves fictives d'un jeune homme simple, confronté aux leurres de l'optimisme, mais qui n'entend pas désespérer et qui en vient à une sagesse finale, mesurée et mystérieuse. Candide n'en a pas fini de nous inviter au gai savoir et à la réflexion.", - "edition": "Larousse édition", - "language": "Français", - "libraryCatalog": "Amazon", - "numPages": 176, - "publisher": "Larousse", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.de/Fiktionen-Erz%C3%A4hlungen-Jorge-Luis-Borges/dp/3596105811/ref=sr_1_1?ie=UTF8&qid=1362329791&sr=8-1&lang=de-de&language=de_DE", - "items": [ - { - "itemType": "book", - "title": "Fiktionen: Erzählungen 1939 - 1944", - "creators": [ - { - "firstName": "Jorge Luis", - "lastName": "Borges", - "creatorType": "author" - } - ], - "date": "1992", - "ISBN": "9783596105816", - "abstractNote": "Gleich bei seinem Erscheinen in den 40er Jahren löste Jorge Luis Borges’ erster Erzählband »Fiktionen« eine literarische Revolution aus. Erfundene Biographien, fiktive Bücher, irreale Zeitläufe und künstliche Realitäten verflocht Borges zu einem geheimnisvollen Labyrinth, das den Leser mit seinen Rätseln stets auf neue herausfordert. Zugleich begründete er mit seinen berühmten Erzählungen wie»›Die Bibliothek zu Babel«, «Die kreisförmigen Ruinen« oder»›Der Süden« den modernen »Magischen Realismus«.\n\n»Obwohl sie sich im Stil derart unterscheiden, zeigen zwei Autoren uns ein Bild des nächsten Jahrtausends: Joyce und Borges.« Umberto Eco", - "edition": "16", - "language": "Deutsch", - "libraryCatalog": "Amazon", - "numPages": 192, - "place": "Frankfurt am Main", - "publisher": "FISCHER Taschenbuch", - "shortTitle": "Fiktionen", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.co.uk/Tale-Two-Cities-ebook/dp/B004EHZXVQ/ref=sr_1_1?s=books&ie=UTF8&qid=1362329884&sr=1-1", - "items": [ - { - "itemType": "book", - "title": "A Tale of Two Cities", - "creators": [ - { - "firstName": "Charles", - "lastName": "Dickens", - "creatorType": "author" - } - ], - "date": "2010-12-01", - "abstractNote": "Novel by Charles Dickens, published both serially and in book form in 1859. The story is set in the late 18th century against the background of the French Revolution. Although Dickens borrowed from Thomas Carlyle's history, The French Revolution, for his sprawling tale of London and revolutionary Paris, the novel offers more drama than accuracy. The scenes of large-scale mob violence are especially vivid, if superficial in historical understanding. The complex plot involves Sydney Carton's sacrifice of his own life on behalf of his friends Charles Darnay and Lucie Manette. While political events drive the story, Dickens takes a decidedly antipolitical tone, lambasting both aristocratic tyranny and revolutionary excess--the latter memorably caricatured in Madame Defarge, who knits beside the guillotine. The book is perhaps best known for its opening lines, \"It was the best of times, it was the worst of times,\" and for Carton's last speech, in which he says of his replacing Darnay in a prison cell, \"It is a far, far better thing that I do, than I have ever done; it is a far, far better rest that I go to, than I have ever known.\" -- The Merriam-Webster Encyclopedia of Literature", - "language": "English", - "libraryCatalog": "Amazon", - "numPages": 290, - "publisher": "Public Domain Books", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.it/Emil-Astrid-Lindgren/dp/888203867X/ref=sr_1_1?s=books&ie=UTF8&qid=1362324961&sr=1-1", - "items": [ - { - "itemType": "book", - "title": "Emil. Ediz. illustrata", - "creators": [ - { - "firstName": "Astrid", - "lastName": "Lindgren", - "creatorType": "author" - }, - { - "firstName": "Björn", - "lastName": "Berg", - "creatorType": "contributor" - }, - { - "firstName": "Annuska Palme Larussa", - "lastName": "Sanavio", - "creatorType": "translator" - } - ], - "date": "2008", - "ISBN": "9788882038670", - "abstractNote": "Si pensa che soprattutto in una casa moderna, con prese elettriche, gas, balconi altissimi un bambino possa mettersi in pericolo: Emil vive in una tranquilla casa di campagna, ma riesce a ficcare la testa in una zuppiera e a rimanervi incastrato, a issare la sorellina Ida in cima all'asta di una bandiera, e a fare una tale baldoria alla fiera del paese che i contadini decideranno di organizzare una colletta per spedirlo in America e liberare così la sua povera famiglia. Ma questo succederà nel prossimo libro di Emil, perché ce ne sarà un altro, anzi due, tante sono le sue monellerie. Età di lettura: da 7 anni.", - "edition": "3° edizione", - "language": "Italiano", - "libraryCatalog": "Amazon", - "numPages": 72, - "publisher": "Nord-Sud", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.co.uk/Walt-Disney-Pixar-Up-DVD/dp/B0029Z9UQ4/ref=sr_1_1?s=dvd&ie=UTF8&qid=1395560537&sr=1-1&keywords=up", - "items": [ - { - "itemType": "videoRecording", - "title": "Up", - "creators": [ - { - "firstName": "Ed", - "lastName": "Asner", - "creatorType": "castMember" - }, - { - "firstName": "Christopher", - "lastName": "Plummer", - "creatorType": "castMember" - }, - { - "firstName": "Jordan", - "lastName": "Nagai", - "creatorType": "castMember" - }, - { - "firstName": "Pete", - "lastName": "Docter", - "creatorType": "director" - }, - { - "firstName": "Bob", - "lastName": "Peterson", - "creatorType": "director" - } - ], - "date": "15 Feb. 2010", - "language": "English, Hindi", - "libraryCatalog": "Amazon", - "runningTime": "1 hour and 33 minutes", - "studio": "Walt Disney Studios Home Entertainment", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.de/gp/product/B00GKBYC3E?ie=UTF8&*Version*=1&*entries*=0", - "items": [ - { - "itemType": "audioRecording", - "title": "Die Eiskönigin Völlig Unverfroren", - "creators": [ - { - "lastName": "Various artists", - "creatorType": "performer", - "fieldMode": 1 - } - ], - "libraryCatalog": "Amazon", - "runningTime": "1:09:16", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.co.jp/gp/product/0099578077/", - "items": [ - { - "itemType": "book", - "title": "1Q84: Books 1, 2 and 3", - "creators": [ - { - "firstName": "Haruki", - "lastName": "Murakami", - "creatorType": "author" - } - ], - "date": "2012-08-02", - "ISBN": "9780099578079", - "abstractNote": "The year is 1Q84. This is the real world, there is no doubt about that. But in this world, there are two moons in the sky. In this world, the fates of two people, Tengo and Aomame, are closely intertwined. They are each, in their own way, doing something very dangerous. And in this world, there seems no way to save them both. Something extraordinary is starting.", - "edition": "Combined edition", - "language": "English", - "libraryCatalog": "Amazon", - "numPages": 1328, - "publisher": "Vintage", - "shortTitle": "1Q84", - "place": "London", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.com/Mark-LeBar/e/B00BU8L2DK", - "items": "multiple" - }, - { - "type": "web", - "url": "https://www.amazon.com/First-Quarto-Hamlet-Cambridge-Shakespeare-dp-0521418194/dp/0521418194/ref=mt_hardcover?_encoding=UTF8&me=&qid=", - "items": [ - { - "itemType": "book", - "title": "The First Quarto of Hamlet", - "creators": [ - { - "firstName": "William", - "lastName": "Shakespeare", - "creatorType": "author" - }, - { - "firstName": "Kathleen O.", - "lastName": "Irace", - "creatorType": "editor" - } - ], - "date": "1998-04-28", - "ISBN": "9780521418195", - "abstractNote": "The first printed text of Shakespeare's Hamlet is about half the length of the more familiar second quarto and Folio versions. It reorders and combines key plot elements to present its own workable alternatives. This is the only modernized critical edition of the 1603 quarto in print. Kathleen Irace explains its possible origins, special features and surprisingly rich performance history, and while describing textual differences between it and other versions, offers alternatives that actors or directors might choose for specific productions.", - "edition": "First Edition", - "language": "English", - "libraryCatalog": "Amazon", - "numPages": 144, - "place": "New York", - "publisher": "Cambridge University Press", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.co.jp/dp/4003314212", - "items": [ - { - "itemType": "book", - "title": "日本イデオロギー論", - "creators": [ - { - "firstName": "潤", - "lastName": "戸坂", - "creatorType": "author" - } - ], - "date": "1977-09-16", - "ISBN": "9784003314210", - "language": "Japanese", - "libraryCatalog": "Amazon", - "publisher": "岩波書店", - "abstractNote": "帯ありません。若干のスレはありますがほぼ普通です。小口、天辺に少しヤケがあります。中身は少しヤケはありますがきれいです。", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.com/Studies-Saiva-Siddhanta-Classic-Reprint-Nallasvami/dp/1333821387/ref=sr_1_1?keywords=saiva+siddhanta&s=gateway", - "items": [ - { - "itemType": "book", - "title": "Studies in Saiva-Siddhanta", - "creators": [ - { - "firstName": "J. M. Nallasvami", - "lastName": "Pillai", - "creatorType": "author" - } - ], - "date": "2018-08-24", - "ISBN": "9781333821388", - "abstractNote": "Excerpt from Studies in Saiva-SiddhantaEuropean Sanskritist, unaware perhaps of the bearings of the expression, rendered the collocation Parama-hamsa' into 'great goose'. The strictly pedagogic purist may endeavour to justify such puerile versions on etymological grounds, but they stand Self-condemned as mal-interpretations re?ecting anything but the sense and soul of the original. Such lapses into unwitting ignorance, need never be expected in any of the essays contained in the present collection, as our author is not only a sturdy and indefatigable researcher in Tamil philosophic literature illuminative Of the Agamic religion, but has also, in his quest after Truth, freely utilised the services of those Indigenous savam's, who represent the highest water-mark of Hindu traditional learning and spiritual associations at the present-day.", - "language": "English", - "libraryCatalog": "Amazon", - "numPages": 396, - "publisher": "Forgotten Books", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.amazon.cn/dp/B07ZCN6W8H/ref=pd_sbs_351_1/459-4160990-6582747?_encoding=UTF8&pd_rd_i=B07ZCN6W8H&pd_rd_r=f03864d4-9412-43cf-ad75-a8edf561c28f&pd_rd_w=IisHL&pd_rd_wg=WUPGI&pf_rd_p=5bb179b2-ff44-431e-a8ee-d606fb63c2c9&pf_rd_r=SVY9ESS4Z4D02K9BWW40&psc=1&refRID=SVY9ESS4Z4D02K9BWW40", - "items": [ - { - "itemType": "book", - "title": "中国之翼:飞行在战争、谎言、罗曼史和大冒险的黄金时代", - "creators": [ - { - "firstName": "奇", - "lastName": "美]格雷戈里·克劳", - "creatorType": "author" - }, - { - "firstName": "亚", - "lastName": "戈叔", - "creatorType": "author" - }, - { - "firstName": "琪", - "lastName": "陈安", - "creatorType": "author" - } - ], - "date": "2015-05-01", - "edition": "第 1st 版", - "libraryCatalog": "Amazon", - "publisher": "社会科学文献出版社", - "abstractNote": "《中国之翼》是一本书写了一段未被透露的航空编年史的篇章,它讲述了二战时期亚洲战场动荡的背景下的航空冒险的扣人心弦的故事。故事的主体是激动人心的真实的“空中兄弟连”的冒险事迹。正是这些人在二战期间帮助打开了被封锁的中国的天空,并勇敢的在各种冲突中勇敢守卫着它。这是一段值得被更多的中国人和美国人知晓并铭记的航空史和中美关系史。", - "attachments": [ - { - "title": "Amazon.com Link", - "snapshot": false, - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] } ] /** END TEST CASES **/