mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 23:46:08 +01:00
New Download Logic
Less Hard Code
This commit is contained in:
parent
9ab3fa57fc
commit
f1088f4f53
1 changed files with 11 additions and 10 deletions
|
|
@ -105,16 +105,17 @@ def parse_index(self):
|
|||
relativea = li.find('a', href=True).get('href', False)
|
||||
a = 'http://hkm.appledaily.com/' + relativea
|
||||
title = li.find('a', text=True).strip()
|
||||
if (time.tzname != 'HKT'):
|
||||
if (title == u'三藩市'):
|
||||
continue
|
||||
if (title == u'洛杉磯'):
|
||||
continue
|
||||
if (title == u'紐 約'):
|
||||
continue
|
||||
if (title == u'美 國'):
|
||||
continue
|
||||
if (not title == u'動新聞') and (relativea.startswith('list.php')):
|
||||
# if (time.tzname != 'HKT'):
|
||||
# if (title == u'三藩市'):
|
||||
# continue
|
||||
# if (title == u'洛杉磯'):
|
||||
# continue
|
||||
# if (title == u'紐 約'):
|
||||
# continue
|
||||
# if (title == u'美 國'):
|
||||
# continue
|
||||
# if (not title == u'動新聞') and (relativea.startswith('list.php')):
|
||||
if (relativea.find('category=daily')!= -1 )and (relativea.startswith('list.php')):
|
||||
sectionList.append((title, a))
|
||||
for title, url in sectionList:
|
||||
title = title.replace(" ", "")
|
||||
|
|
|
|||
Loading…
Reference in a new issue