LeekHub / leek-fund

:chart_with_upwards_trend: 韭菜盒子——VSCode 里也可以看股票 & 基金实时数据,做最好用的投资插件 🐥
http://leek.fund
BSD 3-Clause "New" or "Revised" License
3.04k stars 436 forks source link

请求新浪链接已经403 #359

Closed qq516249940 closed 4 months ago

qq516249940 commented 2 years ago

请求新浪链接已经403 https://hq.sinajs.cn/list=hk00700 请问还有请求地址吗,还有是如何更换地址。 image

giscafer commented 2 years ago

development.md 文档

giscafer commented 2 years ago

165

James-chok commented 2 years ago

公司网墙了?

giscafer commented 2 years ago

这个地址我也访问不了,待观察

qq516249940 commented 2 years ago

In [13]: import requests

In [14]: headers={'Referer' :'https://finance.sina.com.cn'} ...: url='https://hq.sinajs.cn/list=sh600000' ...: file=requests.get(url=url,headers=headers) ...: print(file.text) var hq_str_sh600000="浦发银行,6.830,6.780,6.940,6.980,6.830,6.940,6.950,40237053,277525770.000,71208,6.940,278600,6.930,136200,6.920,133700,6.910,261400,6.900,283009,6.950,781217,6.960,817835,6.970,902872,6.980,1002106,6.990,2022-11-11,15:00:00,00,"; image

我使用python3 添加Referer可以访问了, Referer 是一个常见字段,提供访问来源的信息。 来源:https://www.jisilu.cn/question/449813 请各位大佬参考一下。

ghost commented 1 year ago

666