爬虫大佬帮我看下。
314
- cnly19872018-01-08论坛元老76630
直接在浏览器里面信息是OK的。
但是python requests获取的都是空的。- import requests
- from bs4 import BeautifulSoup
- import json
- rq = requests.get('https://www.trackingmore.com/gettracedetaildes.php?lang=cn&itemkey=&callback=res&tracknumber==LW590500672CN')
- res = rq.text
- print(res)复制代码
结果显示:
- res({"originCountryData":{"countryname":"","destinationcountry":"","destinationcountryname":"","stausDataNum":1,"infoState":3,"statusInfo":"","trackinfo":""},"destinationCountryData":{"infoState":3}})复制代码
应该是这样子的才对啊:
- Query17100538792999891633_1515387010948({
- "originCountryData": {
- "destinationcountry": "US",
- "trackinfo": [
- {
- "Date": "2017-08-05 11:45:00",
- "StatusDescription": "妥投,",
- "Details": ""
- },
- {
- "Date": "2017-08-05 04:02:00",
- "StatusDescription": "到达投递局",
- "Details": "美国"
- },
- {
- "Date": "2017-08-05 03:29:00",
- "StatusDescription": "到达投递局",
- "Details": ""
- },
- {
- "Date": "2017-07-26 11:23:12",
- "StatusDescription": "离开深圳市 发往芝加哥",
- "Details": "深圳市"
- },
- 。。。。。。。。复制代码