From 790b8273a7463fe64485d2875a1aa57b9440650b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 31 Jul 2017 19:48:16 +0530 Subject: [PATCH] Update Associated Press --- recipes/ap.recipe | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/ap.recipe b/recipes/ap.recipe index 37e594819e..2c6e9f0c31 100644 --- a/recipes/ap.recipe +++ b/recipes/ap.recipe @@ -35,6 +35,8 @@ class AssociatedPress(BasicNewsRecipe): articles = [] for x in soup.findAll('p', attrs={'class': ['ap-newsbriefitem-p', 'ap-topheadlineitem-p']}): + if not x.contents: + x = x.parent a = x.find('a', href=True) title = self.tag_to_string(a) url = "http://hosted.ap.org" + a['href']