refraction-ray / xalpha

基金投资管理回测引擎
MIT License
2.02k stars 437 forks source link

使用多进程时报错 #168

Open YazhouTUD opened 1 year ago

YazhouTUD commented 1 year ago

当使用多进程爬取基金数据时,报错如下:

Fails at fetching url: http://fund.eastmoney.com/f10/F10DataApi.aspx?type=lsjz&code=014326&page=1&per=1. Try again. 当点击以上链接时,网页无法打开,出现如下错误: This site can’t be reachedThe webpage at https://fundf10.eastmoney.com/F10DataApi.aspx?type=lsjz&code=014326&page=1&per=1 might be temporarily down or it may have moved permanently to a new web address. ERR_INVALID_RESPONSE

等过了几分钟,上面的链接又可以打开了。这似乎是上面的基金网采取了某种反爬措施,对短时间大量访问进行了屏蔽。请问有办法解决吗?

refraction-ray commented 1 year ago

反爬 xalpha 层面没有特有的办法解决,只能用通用的一些办法,爬慢一点或者用 ip 代理池之类的