mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Get unmodified HTML from the wayback machine
This commit is contained in:
parent
1f38680cb5
commit
d5d577a0a2
@ -140,7 +140,10 @@ def wayback_machine_cached_url(url, br=None, log=prints, timeout=60):
|
||||
try:
|
||||
closest = data['archived_snapshots']['closest']
|
||||
if closest['available']:
|
||||
return closest['url'].replace('http:', 'https:')
|
||||
ans = closest['url'].replace('http:', 'https:', 1)
|
||||
# get unmodified HTML
|
||||
ans = ans.replace(closest['timestamp'], closest['timestamp'] + 'id_', 1)
|
||||
return ans
|
||||
except Exception:
|
||||
pass
|
||||
from pprint import pformat
|
||||
|
Loading…
x
Reference in New Issue
Block a user