mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 23:13:42 +02:00
serve correct issue every day of the week
This commit is contained in:
parent
f468a0c4fd
commit
3dccff1f94
1 changed files with 4 additions and 1 deletions
|
|
@ -24,7 +24,10 @@ def find_last_issue(self):
|
|||
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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue