1. Use requests. Session (), you can automate the management of cookies, session, and so on.
2. The specific process can capture packet analysis. All requested parameters such as to be clear need to analyze JS source code. can only hint, altogether divides into three steps:
First step: Get Prov_cd (region number);
The second step: the URL for the dynamic (incoming phone number and the first step obtained prov_cd) post to send JSON data in the way of getting Salecode, Activityno, Operateid.
The cell phone number in JSON needs to be Base64.b64encode (Phone.encode (' UTF-8 ')), and you need to pass the first step to get the PROV_CD
The third step: How to send JSON data by post to get the phone number status is abnormal, order number, serial number and so on. The JSON data requires the parameters returned in step first to second.
3. Three response data are JSON, parsing available json.loads ()
4. Finally don't forget Session.close ().
Python package crawl China Mobile top-up page---can determine whether the phone number is abnormal