diff --git a/recipes/straitstimes.recipe b/recipes/straitstimes.recipe index 5bc21dfd81..9ac9af1e86 100644 --- a/recipes/straitstimes.recipe +++ b/recipes/straitstimes.recipe @@ -43,19 +43,23 @@ class StraitsTimes(BasicNewsRecipe): remove_tags_after = dict(name='div', attrs={'class': 'hr_thin'}) feeds = [ - - (u'Singapore', u'http://www.straitstimes.com/news/singapore/rss.xml'), - (u'Asia', u'http://www.straitstimes.com/news/asia/rss.xml'), - (u'Business', u'http://www.straitstimes.com/news/business/rss.xml'), - (u'Sport', u'http://www.straitstimes.com/news/sport/rss.xml'), - (u'World', u'http://www.straitstimes.com/news/world/rss.xml'), - (u'Lifestyle', u'http://www.straitstimes.com/news/lifestyle/rss.xml'), - (u'Digital Life', u'http://www.straitstimes.com/news/digital-life/rss.xml') + (u'Top of the News' , u'http://www.straitstimes.com/print/top-of-the-news/rss.xml') + ,(u'World' , u'http://www.straitstimes.com/print/world/rss.xml') + ,(u'Home' , u'http://www.straitstimes.com/print/home/rss.xml') + ,(u'Business' , u'http://www.straitstimes.com/print/business/rss.xml') + ,(u'Life' , u'http://www.straitstimes.com/print/life/rss.xml') + ,(u'Science' , u'http://www.straitstimes.com/print/science/rss.xml') + ,(u'Digital' , u'http://www.straitstimes.com/print/digital/rss.xml') + ,(u'Insight' , u'http://www.straitstimes.com/print/insight/rss.xml') + ,(u'Opinion' , u'http://www.straitstimes.com/print/opinion/rss.xml') + ,(u'Forum' , u'http://www.straitstimes.com/print/forum/rss.xml') + ,(u'Big Picture' , u'http://www.straitstimes.com/print/big-picture/rss.xml') + ,(u'Community' , u'http://www.straitstimes.com/print/community/rss.xml') + ,(u'Education' , u'http://www.straitstimes.com/print/education/rss.xml') ] def preprocess_html(self, soup): - for a in soup.findAll('a', attrs={'class': 'thumb'}): - img = a.find('img') - if img is not None: - img['src'] = a['href'] + for img in soup.findAll('img', srcset=True): + img['src'] = img['srcset'].partition(' ')[0] + img['srcset'] = '' return soup