From 26d4766a2835aab00b0201198376d4ca42cc1d82 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 10 Aug 2020 21:50:50 -0700 Subject: extract PDF urls for e-periodica.ch --- python/sandcrawler/html.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3