Fix #1730707 [Impossible to retrieve News from The Newyorker](https://bugs.launchpad.net/calibre/+bug/1730707)

This commit is contained in:
Kovid Goyal 2017-11-08 08:05:54 +05:30
parent b95d0a537d
commit aa8f685184
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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'})