Python crawls content in mobile apps

Source: Internet
Author: User

First download the Wireshark and simulator (daily Simulator, Night God simulator), every day simulator in the own App store can log in.

Then open Wireshark Select a NIC to start grabbing the packet.

After beginning to grab the bag, in the simulator to crawl the app to the desired resources for click Access, after the operation is completed stop capturing, eliminate interference.

Filter is used for filtering data and entering the selected filter conditions inside. The relevant syntax and settings can be found on the Internet, where there are fewer distractions, and directly select the HTTP protocol packets.

Click on the required data for analysis, you can copy the fields inside to construct the header and then access the resources.

1 #Coding:utf82 ImportRequests3 4URL ='http://zhidujia.com/api/mail/whiteList/599434bb04ca4e49892b25ea'5 6Headers ={'Content-type':'Application/json',           7            'UID':'594ca4ef43525e8',8            'MemberID':'5994abbas26e49892b25ea',9            'version':'1.0',Ten            'Salt':'15089506600', One            'appversion':'1.0', A            'token':'569as4d62as51234c98a8ba22c', -            'Terminal':'1', -            } the #' Connection ': ' keep-alive ', ' Host ': ' zhidujia.com ', ' accept-encoding ': ' gzip ', - #' user-agent ': ' okhttp/3.5.0 ', ' Request Version ': ' http/1.1 ', -res = Requests.get (url,headers=headers) - PrintRes + PrintRes.text

Python crawls content in mobile apps

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.