diff --git a/recipes/wired.recipe b/recipes/wired.recipe index 1504fd6d99..e9a9a4454c 100644 --- a/recipes/wired.recipe +++ b/recipes/wired.recipe @@ -4,6 +4,7 @@ __copyright__ = '2014, Darko Miletic ' www.wired.com ''' +from calibre import browser from calibre.web.feeds.news import BasicNewsRecipe @@ -80,3 +81,17 @@ class WiredDailyNews(BasicNewsRecipe): articles.extend(self.parse_wired_index_page(baseurl.format(pagenum), seen)) return [('Magazine Articles', articles)] + + # Wired changes the content it delivers based on cookies, so the + # following ensures that we send no cookies + def get_browser(self, *args, **kwargs): + return self + + def clone_browser(self, *args, **kwargs): + return self.get_browser() + + def open_novisit(self, *args, **kwargs): + br = browser() + return br.open_novisit(*args, **kwargs) + + open = open_novisit diff --git a/recipes/wired_daily.recipe b/recipes/wired_daily.recipe index 62d7df23cd..42d0357a98 100644 --- a/recipes/wired_daily.recipe +++ b/recipes/wired_daily.recipe @@ -4,6 +4,7 @@ __copyright__ = '2014, Darko Miletic ' www.wired.com ''' +from calibre import browser from calibre.web.feeds.news import BasicNewsRecipe @@ -66,3 +67,17 @@ class WiredDailyNews(BasicNewsRecipe): def get_article_url(self, article): return article.get('link', None) + + # Wired changes the content it delivers based on cookies, so the + # following ensures that we send no cookies + def get_browser(self, *args, **kwargs): + return self + + def clone_browser(self, *args, **kwargs): + return self.get_browser() + + def open_novisit(self, *args, **kwargs): + br = browser() + return br.open_novisit(*args, **kwargs) + + open = open_novisit