This commit is contained in:
fzzinchemical
2026-01-22 22:01:07 +01:00
parent 9910bd202a
commit 02b00ee108
122 changed files with 51725 additions and 4768 deletions

View File

@@ -1,15 +1,15 @@
{
"translatorID": "3dcbb947-f7e3-4bbd-a4e5-717f3701d624",
"translatorType": 4,
"label": "HeinOnline",
"creator": "Frank Bennett",
"target": "^https?://(www\\.)?heinonline\\.org/HOL/(LuceneSearch|Page|IFLPMetaData|AuthorProfile)\\?",
"minVersion": "3.0",
"maxVersion": "",
"maxVersion": null,
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2025-06-20 17:11:32"
"lastUpdated": "2026-01-09 20:40:00"
}
/*
@@ -113,8 +113,22 @@ async function scrapePage(doc, url) {
// Check for an RIS popup link in the page.
var risLink = doc.querySelector('a[href*="CitationFile?kind=ris"]');
if (risLink) {
let risURL = risLink.href;
let ris = await requestText(risURL);
let risURL = new URL(risLink.href);
let docURLSearchParams = new URLSearchParams(doc.location.search);
// Work around id and div parameters being swapped(?) in the link URL
// embedded in the page's static HTML
if (risURL.searchParams.has('div')
&& docURLSearchParams.has('div')
&& risURL.searchParams.get('div') !== docURLSearchParams.get('div')
&& risURL.searchParams.get('id') === docURLSearchParams.get('div')) {
let id = risURL.searchParams.get('id');
let div = risURL.searchParams.get('div');
risURL.searchParams.set('id', div);
risURL.searchParams.set('div', id);
}
let ris = await requestText(risURL.toString());
let pdfURL = null;
// the PDF URL gives us a page that will refresh itself to the PDF.