Merge pull request #833 from Gluejar/more_online

fix undefined "stapled"
pull/94/head
eshellman 2019-03-08 23:51:58 -05:00 committed by GitHub
commit 6031aa8733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -106,6 +106,7 @@ def dl_online(ebook, limiter=rl.delay):
# staple the chapters
pdflinks = [urlparse.urljoin(base, a['href']) for a in doc.select('a.pdf-link')]
stapled = None
if pdflinks:
stapled = make_stapled_ebook(pdflinks, ebook, user_agent=settings.GOOGLEBOT_UA)
if stapled: