mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
irish times
add desc
This commit is contained in:
parent
3943d95dcd
commit
e1dee20448
@ -94,3 +94,8 @@ class IrishTimes(BasicNewsRecipe):
|
|||||||
for img in soup.findAll('img', attrs={'srcset': True}):
|
for img in soup.findAll('img', attrs={'srcset': True}):
|
||||||
img['src'] = img['srcset'].split()[0]
|
img['src'] = img['srcset'].split()[0]
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
|
def populate_article_metadata(self, article, soup, first):
|
||||||
|
desc = soup.find(**classes('b-it-subheadline'))
|
||||||
|
if desc:
|
||||||
|
article.summary = article.text_summary = self.tag_to_string(desc)
|
||||||
|
@ -21,6 +21,12 @@ class AListApart (BasicNewsRecipe):
|
|||||||
encoding = 'utf8'
|
encoding = 'utf8'
|
||||||
cover_url = u'https://alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg'
|
cover_url = u'https://alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg'
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
BasicNewsRecipe.__init__(self, *args, **kwargs)
|
||||||
|
d = self.recipe_specific_options.get('days')
|
||||||
|
if d and isinstance(d, str):
|
||||||
|
self.oldest_article = float(d)
|
||||||
|
|
||||||
def get_extra_css(self):
|
def get_extra_css(self):
|
||||||
if not self.extra_css:
|
if not self.extra_css:
|
||||||
br = self.get_browser()
|
br = self.get_browser()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user