This commit is contained in:
Kovid Goyal
2024-01-18 07:17:21 +05:30
+3 -1
View File
@@ -92,7 +92,9 @@ class WSJ(BasicNewsRecipe):
try:
br.open(url)
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)
pt = PersistentTemporaryFile('.html')
pt.write(raw.encode('utf-8'))