mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-27 14:34:37 +01:00
Fix #1730707 [Impossible to retrieve News from The Newyorker](https://bugs.launchpad.net/calibre/+bug/1730707)
This commit is contained in:
parent
b95d0a537d
commit
aa8f685184
1 changed files with 4 additions and 2 deletions
|
|
@ -56,6 +56,7 @@ class NewYorker(BasicNewsRecipe):
|
|||
remove_tags = [
|
||||
classes('content-ad-wrapper social-hover background-image'),
|
||||
dict(id=['newsletter-signup']),
|
||||
dict(attrs={'class': lambda x: x and 'ImageEmbed__button___' in x}),
|
||||
dict(name='links source'.split()), ]
|
||||
remove_attributes = ['style']
|
||||
|
||||
|
|
@ -80,8 +81,9 @@ def parse_index(self):
|
|||
except KeyError:
|
||||
section = last_section
|
||||
last_section = section
|
||||
a = story.find('h4').find('a')
|
||||
title = a.contents[1]
|
||||
h4 = story.find('h4')
|
||||
title = self.tag_to_string(h4)
|
||||
a = story.find('h4').parent
|
||||
url = absurl(a['href'])
|
||||
desc = ''
|
||||
body = story.find(attrs={'class': 'River__dek___CayIg'})
|
||||
|
|
|
|||
Loading…
Reference in a new issue