Skip to content

Instantly share code, notes, and snippets.

@iydon
Last active January 29, 2020 07:23
Show Gist options
  • Save iydon/6c80ef657e8a1db3e22e636dee37feec to your computer and use it in GitHub Desktop.
Save iydon/6c80ef657e8a1db3e22e636dee37feec to your computer and use it in GitHub Desktop.
配合 mitmproxy 工具使用下载 APP 数据
# mitmdump -s __file__ -p 8888
from mitmproxy import http
idx = 1
def request(flow):
pass
def response(flow):
global idx
url = 'https://aweme-lq.snssdk.com/aweme/v1/challenge/aweme/'
if flow.request.pretty_url.startswith(url):
with open(f'{idx}.json', 'w') as f:
# __import__('IPython').embed(colors='Linux')
f.write(flow.response.text)
idx += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment