From 3dccff1f9462cd77ab58e3fcf3bbac713787d404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Thu, 20 Feb 2014 00:43:35 +0100 Subject: [PATCH] serve correct issue every day of the week --- recipes/gosc_full.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/gosc_full.recipe b/recipes/gosc_full.recipe index 614a31f232..c14129c816 100644 --- a/recipes/gosc_full.recipe +++ b/recipes/gosc_full.recipe @@ -24,7 +24,10 @@ class GN(BasicNewsRecipe): doc = html.fromstring(raw) page = doc.xpath('//div[@class="c"]//div[@class="search-result"]/div[1]/div[2]/h1//a/@href') - return page[4] + if time.strftime("%w") in ['3','4']: + return page[5] + else: + return page[4] def parse_index(self): soup = self.index_to_soup('http://gosc.pl' + self.find_last_issue())