From 775ea77de575b04fbc32a7d500b4a94629858ee6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 11 Jun 2018 17:44:16 +0530 Subject: [PATCH] Update Slate Fixes #1774841 [Failed: Fetch news from Slate](https://bugs.launchpad.net/calibre/+bug/1774841) --- recipes/slate.recipe | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/slate.recipe b/recipes/slate.recipe index 4ed888df10..f2ede51238 100644 --- a/recipes/slate.recipe +++ b/recipes/slate.recipe @@ -65,6 +65,8 @@ class Slate(BasicNewsRecipe): def slate_section_articles(self, soup): ans = [] main = soup.find('article', attrs={'class': 'main'}) + if main is None: + return ans for a in main.findAll('a', attrs={'class': 'primary'}): url = a['href'] if url.endswith('/'):