李明
|
准备工作
1.xposed和JustTruestMe的安装
GET https://api.amemv.com/aweme/v1/user/follower/list/?user_id=108719454702&max_time=1549012794&count=20&retry_type=no_retry&iid=62172089966&device_id=66011631779&ac=wifi&channel=aweGW&aid=1128&app_name=aweme&version_code=251&version_name=2.5.1&device_platform=android&ssmix=a&device_type=MI+6+&device_brand=Xiaomi&language=zh&os_api=19&os_version=4.4.2&uuid=863254011212197&openudid=1d4bed921e800405&manifest_version_code=251&resolution=1080*1920&dpi=320&update_version_code=2512&_rticket=1549012860987&ts=1549012860&as=a165c0050cb76ccf644355&cp=017bcd54cc4b54f4e1gkoo&mas=01cb98bea6c9a2c3a8d5faf856a795b13dacaccc2c2c6c66c6c66c HTTP/1.1 Accept-Encoding: gzip Cache-Control: max-stale=0 Host: api.amemv.com Connection: Keep-Alive Cookie: install_id=62172089966; ttreq=1$c26b0505a13059d50206f39916d5eaee910a25e9; qh[360]=1; odin_tt=e7eabe3bd71cee75718b6ab8dea9e67e78b97933017ff975f92ca1198179dfea0553012386575dce721502cc0d378c0c65a733783a7888440928643796139b6c User-Agent: okhttp/3.10.0.1
pip install mitmproxy mitmdump -s 文件名称.py -p 端口号
import json try: from douyin.handle_mongo import save_task except: from handle_mongo import save_task def response(flow): #通过fildder的方式获取到请求接口 if 'aweme/v1/user/follower/list' in flow.request.url: #数据的分析获取节点中的followers for user in json.loads(flow.response.text)['followers']: douyin_info = {} #分享的id douyin_info['share_id'] = user['uid'] douyin_info['douyin_id'] = user['short_id'] douyin_info['nickname'] = user['nickname'] print(douyin_info) save_task(douyin_info) PS:找到项目的目录,执行mitmdump -s python文件 -p指定端口。然后就可以将对应的代理吐出来的数据获取到。 流程fildder就是获取url地址,mitmdump出去response吐出来的数据。然后进行处理在存储到mongodb中。技术目标就是不需要人的参与!慢慢的获取完数据后下一步使用appium来进行机器模拟人来点击滑动! |
2019-06-03 09:51:51