Recently this small video app, special Fire, lunch at noon, idle to bored, want to get a short video of quick, see can get.
thus
Opened the fiddler and began to grab the bag,
Set up agent, reboot, Next, view native IP
Phone Open Network Settings
through a proxy server;
Set up, refresh the Quick app.
See the request, go find what you want to use,
No, Dickens found it.
Look at the required parameters, create a new py file,
The parameters are completely copied over.
Client_key21121count20country_codecnid16languagezh-hans-cn;q=1pvfalserefreshtimes1sig2121source1type7
Then write the code.
ImportRequests,jsonurl='Http://124.243.249.4/rest/n/feed/hot?appver=5.7.5.508&did=EB3C5966-C50E-432D-801E-D7EB42964654&c=a &ver=5.7&sys=ios9.3.5&mod=iphone7%2c2&net=%e4%b8%ad%e5%9b%bd%e7%a7%bb%e5%8a%a8_5'Headers={ 'Content-type':'application/x-www-form-urlencoded', 'Host':'124.243.205.129', 'Accept-language':'zh-hans-cn;q=1'}data={ 'Client_key':' A', 'Coldstart':'true', 'Count':' -', 'Country_code':'cn', 'ID':'5', 'language':'zh-hans-cn;q=1', 'PV':'false', 'Refreshtimes':'0', 'Sig':'111', 'Source':'1', 'type':'7'}JSO=requests.post (url,data= (data), headers=headers) List=jso.json () ['Feeds'] forIinchlist:Print('Description:%s'%i['caption']) Print('Video connection:%s'%i['Main_mv_urls'][0]['URL']) Print('%s'%i['user_name'])Print('User id:%s'%i['user_id'])
Print the output of our
Open the connection. It can be played after downloading.
You can then find the video comments based on the information returned.
Careful analysis, you can crawl to.
Popular videos, popular pictures, etc. can be crawled.
Python crawling racer iOS home popular videos