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 = [
|
remove_tags = [
|
||||||
classes('content-ad-wrapper social-hover background-image'),
|
classes('content-ad-wrapper social-hover background-image'),
|
||||||
dict(id=['newsletter-signup']),
|
dict(id=['newsletter-signup']),
|
||||||
|
dict(attrs={'class': lambda x: x and 'ImageEmbed__button___' in x}),
|
||||||
dict(name='links source'.split()), ]
|
dict(name='links source'.split()), ]
|
||||||
remove_attributes = ['style']
|
remove_attributes = ['style']
|
||||||
|
|
||||||
@ -80,8 +81,9 @@ class NewYorker(BasicNewsRecipe):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
section = last_section
|
section = last_section
|
||||||
last_section = section
|
last_section = section
|
||||||
a = story.find('h4').find('a')
|
h4 = story.find('h4')
|
||||||
title = a.contents[1]
|
title = self.tag_to_string(h4)
|
||||||
|
a = story.find('h4').parent
|
||||||
url = absurl(a['href'])
|
url = absurl(a['href'])
|
||||||
desc = ''
|
desc = ''
|
||||||
body = story.find(attrs={'class': 'River__dek___CayIg'})
|
body = story.find(attrs={'class': 'River__dek___CayIg'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user