diff --git a/core/loaders/harvest.py b/core/loaders/harvest.py index 90cc3c46..47160f26 100644 --- a/core/loaders/harvest.py +++ b/core/loaders/harvest.py @@ -203,6 +203,7 @@ def harvesters(ebook): yield ebook.provider in ('epress.lib.uts.edu.au', 'utsepress.lib.uts.edu.au'), harvest_ubiquity yield ebook.provider == 'orkana.no', harvest_orkana yield ebook.provider == 'euna.una.ac.cr', harvest_euna + yield ebook.provider == 'openresearchlibrary.org', harvest_orl def ebf_if_harvested(url): onlines = models.EbookFile.objects.filter(source=url) @@ -1010,5 +1011,13 @@ def harvest_euna(ebook): set_bookshop(ebook) return None, 0 +def harvest_orl(ebook): + if ebook.url.startswith('https://openresearchlibrary.org/viewer/'): + orl_id = ebook.url[39:] + return make_dl_ebook( + f'https://openresearchlibrary.org/ext/api/media/{orl_id}/assets/external_content.pdf', + ebook) + return None, 0 + \ No newline at end of file