useragent

pull/94/head
eric 2024-02-07 12:38:22 -05:00
parent dd512cf0c0
commit 2bdc75ebde
1 changed files with 2 additions and 2 deletions

View File

@ -354,10 +354,10 @@ def is_bookshop_url(url):
return False
def harvest_generic(ebook):
def harvest_generic(ebook, user_agent=settings.USER_AGENT):
if is_bookshop_url(ebook.url):
return set_bookshop(ebook)
return make_dl_ebook(ebook.url, ebook, user_agent=settings.USER_AGENT)
return make_dl_ebook(ebook.url, ebook, user_agent=user_agent)
def harvest_manual(ebook):