mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -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 @@ class NewYorker(BasicNewsRecipe):
|
||||
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…
x
Reference in New Issue
Block a user