kopia lustrzana https://github.com/bellingcat/auto-archiver
Allow redirects for Archive requets
rodzic
ebafd1a744
commit
2540b54113
|
@ -383,7 +383,7 @@ def process_sheet(sheet):
|
||||||
# i'm sure there's a better way to handle this than nested try/catch blocks
|
# i'm sure there's a better way to handle this than nested try/catch blocks
|
||||||
try:
|
try:
|
||||||
r = requests.get(
|
r = requests.get(
|
||||||
'https://web.archive.org/save/' + v[url_index])
|
'https://web.archive.org/save/' + v[url_index], allow_redirects=True)
|
||||||
|
|
||||||
parsed = BeautifulSoup(r.content, 'html.parser')
|
parsed = BeautifulSoup(r.content, 'html.parser')
|
||||||
title = parsed.find_all('title')[0].text
|
title = parsed.find_all('title')[0].text
|
||||||
|
|
Ładowanie…
Reference in New Issue