new: Add support for last redirect

pull/69/head
Raphaël Vinot 2020-03-18 21:14:48 +01:00
parent 99a97d4d56
commit 971877954e
2 changed files with 5 additions and 2 deletions

View File

@ -233,6 +233,7 @@ class Lookyloo():
harfile = item['har']
png = base64.b64decode(item['png'])
html = item['html']
last_redirect = item['last_redirected_url']
with (dirpath / '{0:0{width}}.har'.format(i, width=width)).open('w') as _har:
json.dump(harfile, _har)
@ -240,6 +241,8 @@ class Lookyloo():
_img.write(png)
with (dirpath / '{0:0{width}}.html'.format(i, width=width)).open('w') as _html:
_html.write(html)
with (dirpath / '{0:0{width}}.last_redirect.txt'.format(i, width=width)).open('w') as _redir:
_redir.write(last_redirect)
if 'childFrames' in item:
child_frames = item['childFrames']

4
poetry.lock generated
View File

@ -251,7 +251,7 @@ publicsuffix2 = "^2.20191221"
six = "^1.14.0"
[package.source]
reference = "7436a88dcc41d26e9e95b24401f26e6f7fe68e32"
reference = "a66c797125bc21d31f9b85c435b9d802904da5fc"
type = "git"
url = "https://github.com/viper-framework/har2tree.git"
[[package]]
@ -701,7 +701,7 @@ scrapy = "^1.8.0"
scrapy-splash = "^0.7.2"
[package.source]
reference = "0bf40df2bfd1c857169300bac21d47311fde1046"
reference = "ea7a492213a47386357ce03edb7e17b455ee2c48"
type = "git"
url = "https://github.com/viper-framework/ScrapySplashWrapper.git"
[[package]]