Open rain1475 opened 3 months ago
发现获取日历的时候被深交所www.szse.cn屏蔽,正常浏览器都无法访问深交所。 怀疑访问过于频繁,是否应该加一个delay?
日志 C:\Projects\Quant\Quant1\bin\Debug\net7.0>python ./normalize.py normalize_data --source_dir C:\Projects\Quant\Quant1\bin\Debug\net7.0\output\ --normalize_dir C:\Projects\Quant\Quant1\bin\Debug\net7.0\output_normalize\ --max_workers=28 --date_field_name="tradedate" 2024-04-12 18:31:40.760 | INFO | data_collector.utils:get_calendar_list:68 - get calendar list: ALL...... 2024-04-12 18:33:17.852 | WARNING | data_collector.utils:wrapper:491 - _get_calendar: 1 :2000-01-->HTTPConnectionPool(host='www.szse.cn', port=80): Read timed out. (read timeout=None)
@rain1475 试过换个 ip 就能访问了么?
换ip可以访问,等5-30分钟也可恢复访问,最长也试过等1个半小时才恢复访问。
这个代码似乎是 qlib 项目里的,我只引用了 qlib 里的库,如果要优化的话,可以贡献到 qlib 项目里
发现获取日历的时候被深交所www.szse.cn屏蔽,正常浏览器都无法访问深交所。 怀疑访问过于频繁,是否应该加一个delay?
日志 C:\Projects\Quant\Quant1\bin\Debug\net7.0>python ./normalize.py normalize_data --source_dir C:\Projects\Quant\Quant1\bin\Debug\net7.0\output\ --normalize_dir C:\Projects\Quant\Quant1\bin\Debug\net7.0\output_normalize\ --max_workers=28 --date_field_name="tradedate" 2024-04-12 18:31:40.760 | INFO | data_collector.utils:get_calendar_list:68 - get calendar list: ALL...... 2024-04-12 18:33:17.852 | WARNING | data_collector.utils:wrapper:491 - _get_calendar: 1 :2000-01-->HTTPConnectionPool(host='www.szse.cn', port=80): Read timed out. (read timeout=None)