make sure cmp is not just chapters

pull/94/head
eric 2020-08-01 22:12:25 -04:00
parent 5439ad3ba3
commit fc2204a0fd
1 changed files with 3 additions and 0 deletions

View File

@ -489,6 +489,9 @@ def harvest_fahce(ebook):
def harvest_cmp(ebook): def harvest_cmp(ebook):
def selector(doc): def selector(doc):
objs = doc.select('.tab-content a.cmp_download_link[href]')
if (len({obj['href'] for obj in objs})) > 1:
return []
return doc.select('a.cmp_download_link[href]') return doc.select('a.cmp_download_link[href]')
def dl(url): def dl(url):
return url.replace('view', 'download') + '?inline=1' return url.replace('view', 'download') + '?inline=1'