diff --git a/recipes/nytimes.recipe b/recipes/nytimes.recipe index 87c09c62d1..55f77237f6 100644 --- a/recipes/nytimes.recipe +++ b/recipes/nytimes.recipe @@ -266,14 +266,11 @@ class NewYorkTimes(BasicNewsRecipe): if article.get('description'): self.log('\t\t', article['description']) - container = soup.find(itemtype='http://schema.org/CollectionPage') - container.find('header').extract() - div = container.find('div') - for section in div.findAll('section'): - for ol in section.findAll('ol'): - for article in self.parse_article_group(ol): - log(article) - yield article + container = soup.find(id='collection-{}'.format(slug)).find('section') + for ol in container.findAll('ol'): + for article in self.parse_article_group(ol): + log(article) + yield article def parse_web_sections(self): self.read_nyt_metadata() diff --git a/recipes/nytimes_sub.recipe b/recipes/nytimes_sub.recipe index ffdf42d62a..02ff62ba3d 100644 --- a/recipes/nytimes_sub.recipe +++ b/recipes/nytimes_sub.recipe @@ -266,14 +266,11 @@ class NewYorkTimes(BasicNewsRecipe): if article.get('description'): self.log('\t\t', article['description']) - container = soup.find(itemtype='http://schema.org/CollectionPage') - container.find('header').extract() - div = container.find('div') - for section in div.findAll('section'): - for ol in section.findAll('ol'): - for article in self.parse_article_group(ol): - log(article) - yield article + container = soup.find(id='collection-{}'.format(slug)).find('section') + for ol in container.findAll('ol'): + for article in self.parse_article_group(ol): + log(article) + yield article def parse_web_sections(self): self.read_nyt_metadata()