From 4accf0954c8d0804f5c1b92c7df57b057efc45d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Dec 2013 09:15:50 +0530 Subject: [PATCH] Update National Geographic Magazine --- recipes/national_geographic_mag.recipe | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/national_geographic_mag.recipe b/recipes/national_geographic_mag.recipe index 8e7cc7709e..4fd60bd35b 100644 --- a/recipes/national_geographic_mag.recipe +++ b/recipes/national_geographic_mag.recipe @@ -12,7 +12,9 @@ class NGM(BasicNewsRecipe): auto_cleanup_keep = '//div[@class="featurepic"]' def nejm_get_index(self): - return self.index_to_soup('http://ngm.nationalgeographic.com/2013/10/table-of-contents') + soup = self.index_to_soup('http://ngm.nationalgeographic.com/') + a = soup.find('div', id='current_issue').find('a', href=True) + return self.index_to_soup('http://ngm.nationalgeographic.com' + a['href']) # To parse artice toc def parse_index(self):