aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-10 21:50:50 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-10 21:50:50 -0700
commit26d4766a2835aab00b0201198376d4ca42cc1d82 (patch)
tree1909749bb0fe7e23fb19f2347011c1a003c220a2
parenta551e4deb4d577a552938dda9dc504a29c033fdf (diff)
downloadsandcrawler-26d4766a2835aab00b0201198376d4ca42cc1d82.tar.gz
sandcrawler-26d4766a2835aab00b0201198376d4ca42cc1d82.zip
extract PDF urls for e-periodica.ch
-rw-r--r--python/sandcrawler/html.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/sandcrawler/html.py b/python/sandcrawler/html.py
index 85d32c0..1d24ca1 100644
--- a/python/sandcrawler/html.py
+++ b/python/sandcrawler/html.py
@@ -372,6 +372,12 @@ def extract_fulltext_url(html_url, html_body):
url = host_prefix + url
return dict(pdf_url=url, technique='ojs-galley-href')
+ # ETH zurich e-periodica
+ if '://www.e-periodica.ch/digbib/view' in html_url:
+ url = html_url.replace('digbib/view', 'cntmng').split('#')[0]
+ if url.encode('utf-8') in html_body:
+ return dict(pdf_url=url, technique='href-eperiodica')
+
### below here we are doing guesses
# generic guess: try current URL plus .pdf, if it exists in the HTML body