New Download Logic

Less Hard Code
This commit is contained in:
Kennyl 2017-01-23 23:38:00 +08:00 committed by GitHub
parent 9ab3fa57fc
commit f1088f4f53

View File

@ -105,16 +105,17 @@ class AppleDaily(BasicNewsRecipe):
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(" ", "")