我要爬取链接: http ://data.eastmoney.com/hsgt/index.html
但是我发现XHR文档都是没有数据的,只有EventSteam,怎么爬取页面的完整信息。
例如,我想在页面上爬取-94.67。
我的代码如下:
import requests
import pandas as pd
from pyquery import PyQuery
from lxml import etree
import time
response = requests.get(url='http://data.eastmoney.com/hsgt/index.html',
headers={'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'})
response.encoding = 'GB2312'
# this shows False
'-94.67' in response.text
然后我尝试安装dryscape但失败了,它说我没有网络服务器文件。
非常感谢您的帮助。