Merge pull request #238 from pft/nrcnex

Use zero-based month as 2nd dynamic field in URL
This commit is contained in:
Kovid Goyal 2014-05-01 12:13:10 +05:30
commit 2386a575f9

View File

@ -42,7 +42,7 @@ class NRCNext(BasicNewsRecipe):
raise ValueError('Failed to login, check username and password')
epubraw = None
for today in (date.today(), date.today() - timedelta(days=1),):
url = 'http://digitaleeditie.nrc.nl/digitaleeditie/NN/%s/3/%s___/downloads.html' % (today.strftime('%Y'), today.strftime('%Y%m%d'))
url = 'http://digitaleeditie.nrc.nl/digitaleeditie/NN/%s/%d/%s___/downloads.html' % (today.strftime('%Y'), today.month - 1, today.strftime('%Y%m%d'))
self.log('Trying to download epub from:', url)
br.start_load(url, timeout=60)
try: