mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Merge branch 'master' of https://github.com/SheinH/calibre
This commit is contained in:
commit
9b5cd1e134
@ -92,7 +92,9 @@ class WSJ(BasicNewsRecipe):
|
|||||||
try:
|
try:
|
||||||
br.open(url)
|
br.open(url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
url = e.hdrs.get('location')
|
hdrs_location = e.hdrs.get('location')
|
||||||
|
if hdrs_location:
|
||||||
|
url = e.hdrs.get('location')
|
||||||
raw = read_url(self.storage, 'https://archive.is/latest/' + url)
|
raw = read_url(self.storage, 'https://archive.is/latest/' + url)
|
||||||
pt = PersistentTemporaryFile('.html')
|
pt = PersistentTemporaryFile('.html')
|
||||||
pt.write(raw.encode('utf-8'))
|
pt.write(raw.encode('utf-8'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user