mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
677dc14286
commit
9c27428cf2
@ -26,9 +26,9 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
|||||||
dict(attrs={'class' : 'gallery-data'}),
|
dict(attrs={'class' : 'gallery-data'}),
|
||||||
dict(attrs={'class' : 'ir btn-fullscreen'}),
|
dict(attrs={'class' : 'ir btn-fullscreen'}),
|
||||||
dict(attrs={'class' : 'tools clearfix'}),
|
dict(attrs={'class' : 'tools clearfix'}),
|
||||||
|
|
||||||
]
|
]
|
||||||
keep_only_tags = [dict(attrs={'class' : 'tmCol article'}),]
|
keep_only_tags = [
|
||||||
|
dict(attrs={'class' : 'tmCol article'}),]
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Local News', u'http://www.birminghammail.co.uk/news/local-news/rss.xml'),
|
(u'Local News', u'http://www.birminghammail.co.uk/news/local-news/rss.xml'),
|
||||||
@ -40,15 +40,12 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
|||||||
extra_css = '''
|
extra_css = '''
|
||||||
h1{font-weight:bold;font-size: 175%;}
|
h1{font-weight:bold;font-size: 175%;}
|
||||||
h2{font-weight:normal;font-size:75%;}
|
h2{font-weight:normal;font-size:75%;}
|
||||||
#p{font-size:14px;}
|
figure {font-size:50%;}
|
||||||
#body{font-size:14px;}
|
img {display: block;margin-left: auto;margin-right: auto;width:100%;font-size:50%;}
|
||||||
#.photo-caption {display: block;margin-left: auto;margin-right: auto;width:100%;font-size:40%;}
|
|
||||||
#.publish-info {font-size:50%;}
|
|
||||||
img {display: block;margin-left: auto;margin-right: auto;width:100%;}
|
|
||||||
'''
|
'''
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
soup = self.index_to_soup('http://www.birminghammail.co.uk')
|
soup = self.index_to_soup('http://www.birminghammail.co.uk')
|
||||||
cov = soup.find(attrs={'src' : re.compile('http://images.icnetwork.co.uk/upl/birmpost/')})
|
cov = soup.find(attrs={'src' : re.compile('http://images.icnetwork.co.uk/upl/birm')})
|
||||||
cov=str(cov)
|
cov=str(cov)
|
||||||
cov2 = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', cov)
|
cov2 = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', cov)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user