Skip to content

Commit

Permalink
Merge pull request #1029 from Gluejar/maintenance-2024
Browse files Browse the repository at this point in the history
tecnum, update de gruyter
  • Loading branch information
eshellman authored Feb 6, 2024
2 parents 027da7c + 408aabb commit b31f660
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/loaders/harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def harvesters(ebook):
yield ebook.provider == 'editorialbonaventuriana.usb.edu.co', harvest_editorialbonaventuriana
yield ebook.provider == 'verlag.gta.arch.ethz.ch', harvest_gta
yield ebook.provider == 'manchesteruniversitypress.co.uk', harvest_manu
yield ebook.provider == 'tectum-elibrary.de', harvest_tecnum


def ebf_if_harvested(url):
Expand Down Expand Up @@ -527,13 +528,13 @@ def harvest_degruyter(ebook):
harvested = None

# check for epub
obj = doc.select_one('a.downloadEpub')
obj = doc.select_one('a.ga_download_dropdown_epub_book')
if obj:
dl_url = urljoin(base, obj['href'])
harvested, made = make_dl_ebook(dl_url, ebook, user_agent=settings.GOOGLEBOT_UA)

# check for pdf
obj = doc.select_one('a.downloadPdf')
obj = doc.select_one('a.downloadCompletePdfBook')
if obj:
dl_url = urljoin(base, obj['href'])
harvested, madepdf = make_dl_ebook(dl_url, ebook, user_agent=settings.GOOGLEBOT_UA)
Expand Down Expand Up @@ -994,6 +995,13 @@ def harvest_waxmann(ebook):
return None, 0


def harvest_tecnum(ebook):
if ebook.url.startswith('https://doi.org/10.5771/'):
url = 'https://www.tectum-elibrary.de/10.5771/' + ebook.url[24:] + '-I.pdf'
return make_dl_ebook(url, ebook)
return None, 0


def harvest_ojs(ebook):
def selector(doc):
return doc.select('#articleFullText a[href]')
Expand Down

0 comments on commit b31f660

Please sign in to comment.