serve correct issue every day of the week

This commit is contained in:
Tomasz Długosz 2014-02-20 00:43:35 +01:00
parent f468a0c4fd
commit 3dccff1f94

View File

@ -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())