1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 06:46:56 +08:00

Update yahooquery marked words (#966)

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update scripts/data_collector/yahoo/collector.py

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* Update collector.py

* Update collector.py

* Update collector.py

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
Wangwuyi123
2022-03-12 20:49:38 +08:00
committed by GitHub
parent 2ed806c846
commit 0f519f6053

View File

@@ -138,7 +138,10 @@ class YahooCollector(BaseCollector):
else:
_show_logging_func()
except Exception as e:
logger.warning(f"{error_msg}:{e}")
logger.warning(
f"get data error: {symbol}--{start_}--{end_}"
+ "Your data request fails. This may be caused by your firewall (e.g. GFW). Please switch your network if you want to access Yahoo! data"
)
def get_data(
self, symbol: str, interval: str, start_datetime: pd.Timestamp, end_datetime: pd.Timestamp
@@ -154,7 +157,9 @@ class YahooCollector(BaseCollector):
end=end_,
)
if resp is None or resp.empty:
raise ValueError(f"get data error: {symbol}--{start_}--{end_}")
raise ValueError(
f"get data error: {symbol}--{start_}--{end_}" + "The stock may be delisted, please check"
)
return resp
_result = None