diff --git a/src/calibre/web/feeds/recipes/recipe_nytimes.py b/src/calibre/web/feeds/recipes/recipe_nytimes.py index 270bd5d499..9276ad667a 100644 --- a/src/calibre/web/feeds/recipes/recipe_nytimes.py +++ b/src/calibre/web/feeds/recipes/recipe_nytimes.py @@ -70,10 +70,14 @@ class NYTimesMobile(BasicNewsRecipe): def find_articles(self, root): for a in root.xpath('//a[@accesskey]'): href = a.get('href') + if href.startswith('http://'): + url = href + else: + url = 'http://mobile.nytimes.com/article' + href[href.find('?'):]+'&single=1', yield { 'title': a.text.strip(), 'date' : '', - 'url' : 'http://mobile.nytimes.com/article' + href[href.find('?'):]+'&single=1', + 'url' : url, 'description': '', } diff --git a/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py b/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py index 4a4286b335..5d91dbae38 100644 --- a/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py +++ b/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py @@ -75,7 +75,9 @@ class NYTimes(BasicNewsRecipe): dict(title=title, url=url, date=pubdate, description=description, content='')) - ans = self.sort_index_by(ans, {'The Front Page':-1, 'Dining In, Dining Out':1, 'Obituaries':2}) + ans = self.sort_index_by(ans, {'The Front Page':-1, + 'Dining In, Dining Out':1, + 'Obituaries':2}) ans = [(key, articles[key]) for key in ans if articles.has_key(key)] return ans diff --git a/src/calibre/web/feeds/recipes/recipe_usatoday.py b/src/calibre/web/feeds/recipes/recipe_usatoday.py index ced927e721..b69fce42f3 100644 --- a/src/calibre/web/feeds/recipes/recipe_usatoday.py +++ b/src/calibre/web/feeds/recipes/recipe_usatoday.py @@ -45,7 +45,7 @@ class USAToday(BasicNewsRecipe): def print_version(self, url): return 'http://www.printthis.clickability.com/pt/printThis?clickMap=printThis&fb=Y&url=' + url - def postprocess_html(self, soup, first_fetch): + def postprocess_html(self, soup, first_fetch): for t in soup.findAll(['table', 'tr', 'td']): t.name = 'div' return soup \ No newline at end of file