Python crawling racer iOS home popular videos

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.