diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2021-03-14 22:49:31 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2021-03-14 22:49:31 +0000 |
| commit | 7b0a11f4d5f1e4d5ff811f83a5da532e90f1e775 (patch) | |
| tree | 712ee1fc6744af40332faa878903042c8872c6e5 | |
| parent | Update notes (diff) | |
| download | paper2remarkable-7b0a11f4d5f1e4d5ff811f83a5da532e90f1e775.tar.gz paper2remarkable-7b0a11f4d5f1e4d5ff811f83a5da532e90f1e775.zip | |
Document previous json payload for posterity
| -rw-r--r-- | paper2remarkable/providers/science_direct.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/paper2remarkable/providers/science_direct.py b/paper2remarkable/providers/science_direct.py index 704a3b0..9baa48d 100644 --- a/paper2remarkable/providers/science_direct.py +++ b/paper2remarkable/providers/science_direct.py @@ -70,7 +70,15 @@ class ScienceDirect(Provider): soup = bs4.BeautifulSoup(page, "html.parser") # For open access (and maybe behind institution?) the full text pdf url - # is currently in the json payload of a script tag. + # is currently in the json payload of a script tag as: + # + # "pdfDownload": { + # "linkType": "DOWNLOAD", + # "linkToPdf": + # "/science/article/pii/S0166354220302011/pdfft?md5=bd2a8d1cfbe3680f2d405b4a62642a15&pid=1-s2.0-S0166354220302011-main.pdf", + # "isPdfFullText": false, + # "fileName": "1-s2.0-S0166354220302011-main.pdf" + # }, scripts = soup.find_all("script", attrs={"data-iso-key": "_0"}) if not scripts: raise URLResolutionError("ScienceDirect", url) |
