参考
爬取
爬取网址:https://live.611.com/zq
根据审查元素,XHR
WS
发现data关联,取data值。
url='https://live.611.com/Live/GetToken'
res=requests.get(url).text
dict=json.loads(res)#str-->dict
data=dict['Data']
print(data)
在使用之前先安装非异步websocket,容易和异步websockets等混淆
pip install websocket-client
然后取出请求的str,补充请求的信息,尝试抓取20条
import json
import time
import requests
url='https://live.611.com/Live/GetToken'
res=requests