mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-11-30 02:48:57 +08:00
fixed 获取节假日出现报错
This commit is contained in:
parent
01559a15fe
commit
9bd8e58f46
@ -181,7 +181,7 @@ def get_new_holidays():
|
|||||||
res.encoding = res.apparent_encoding
|
res.encoding = res.apparent_encoding
|
||||||
ret = re.findall(r'<textarea id="data" style="display:none;">([\s\w\d\W]+)</textarea>', res.text, re.M)[0].strip()
|
ret = re.findall(r'<textarea id="data" style="display:none;">([\s\w\d\W]+)</textarea>', res.text, re.M)[0].strip()
|
||||||
day = [d.split('|')[:4] for d in ret.split('\n')]
|
day = [d.split('|')[:4] for d in ret.split('\n')]
|
||||||
return [v[0] for v in day if v[2] == '中国']
|
return [v[0] for v in day if len(v) >= 3 and v[2] == '中国']
|
||||||
|
|
||||||
|
|
||||||
@hku_catch(ret=[], trace=True)
|
@hku_catch(ret=[], trace=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user