From 3fd75f2dc917889dc2c82fc39d946ae30ceab28b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Feb 2016 08:51:54 +0530 Subject: [PATCH] Update Economic and Political Weekly --- recipes/epw.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/epw.recipe b/recipes/epw.recipe index 779b96ef24..30898e792f 100644 --- a/recipes/epw.recipe +++ b/recipes/epw.recipe @@ -63,7 +63,10 @@ class EconomicAndPoliticalWeekly(BasicNewsRecipe): for div in main.findAll(attrs={'class':lambda x: x and 'views-field-nothing' in x.split()}): title = self.tag_to_string(div) elems = div.findAll('a', href=True) - desc, title = map(self.tag_to_string, elems) + if len(elems) == 2: + desc, title = map(self.tag_to_string, elems) + else: + title, desc = self.tag_to_string(elems[0]), '' url = absurl(elems[-1]['href']) self.log('\t', title, url) self.log('\t\t', desc)