mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
reduce the download size
Don't outside Hong Kong Section when download take place in Hong Kong Determine by System Time Zone (HKT)
This commit is contained in:
parent
699a6a22da
commit
b671517232
@ -9,6 +9,7 @@ from calibre.utils.date import now as nowf
|
|||||||
import os
|
import os
|
||||||
import datetime
|
import datetime
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
from contextlib import nested
|
from contextlib import nested
|
||||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
@ -104,6 +105,15 @@ class AppleDaily(BasicNewsRecipe):
|
|||||||
relativea = li.find('a', href=True).get('href', False)
|
relativea = li.find('a', href=True).get('href', False)
|
||||||
a = 'http://hkm.appledaily.com/' + relativea
|
a = 'http://hkm.appledaily.com/' + relativea
|
||||||
title = li.find('a', text=True).strip()
|
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 (not title == u'動新聞') and (relativea.startswith('list.php')):
|
||||||
sectionList.append((title, a))
|
sectionList.append((title, a))
|
||||||
for title, url in sectionList:
|
for title, url in sectionList:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user