Apparently economist uses both <div> and <section> for index page sections

This commit is contained in:
Kovid Goyal 2020-06-05 09:25:11 +05:30
parent 8de4c3268e
commit f20a32e5c6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ class Economist(BasicNewsRecipe):
self.log('Got cover:', self.cover_url) self.log('Got cover:', self.cover_url)
feeds = [] feeds = []
for section in soup.findAll('div', **classes('layout-weekly-edition-section')): for section in soup.findAll(**classes('layout-weekly-edition-section')):
h2 = section.find('h2') h2 = section.find('h2')
secname = self.tag_to_string(h2) secname = self.tag_to_string(h2)
self.log(secname) self.log(secname)

View File

@ -256,7 +256,7 @@ class Economist(BasicNewsRecipe):
self.log('Got cover:', self.cover_url) self.log('Got cover:', self.cover_url)
feeds = [] feeds = []
for section in soup.findAll('div', **classes('layout-weekly-edition-section')): for section in soup.findAll(**classes('layout-weekly-edition-section')):
h2 = section.find('h2') h2 = section.find('h2')
secname = self.tag_to_string(h2) secname = self.tag_to_string(h2)
self.log(secname) self.log(secname)