From 37a5486abe10270f7ece75dec8df54db49f5ec9c Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 22 Nov 2024 14:33:33 -0500 Subject: [PATCH] fix mit, add redliclibros, nai010 bookshop --- core/loaders/doab_utils.py | 1 + core/loaders/harvest.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/loaders/doab_utils.py b/core/loaders/doab_utils.py index 786ccce9..b7aacc09 100644 --- a/core/loaders/doab_utils.py +++ b/core/loaders/doab_utils.py @@ -85,6 +85,7 @@ STOREPROVIDERS = [ 'manchesteruniversitypress.co.uk', 'mitpress.mit.edu', 'munishop.muni.cz', + 'nai010.com', 'nomos-shop.de', 'palgrave.com', 'placedeslibraires.fr', diff --git a/core/loaders/harvest.py b/core/loaders/harvest.py index 23f62bf9..00d4abaf 100644 --- a/core/loaders/harvest.py +++ b/core/loaders/harvest.py @@ -138,6 +138,7 @@ CMPPROVIDERS = [ 'omp.ub.rub.de', 'penerbit.brin.go.id', 'press.uni.lodz.pl', + 'redliclibros.com', 'Scholars Portal', 'teiresias-supplements.mcgill.ca', 'textbooks.open.tudelft.nl', @@ -938,9 +939,11 @@ def harvest_muse(ebook): def harvest_mitpress(ebook): + def selector(doc): + return doc.select('a.book-pdfLink[href]') def chap_selector(doc): return doc.select('a.section-pdfLink[href]') - return harvest_stapled_generic(ebook, None, chap_selector, strip_covers=0) + return harvest_stapled_generic(ebook, selector, chap_selector, strip_covers=0) def harvest_ios(ebook):