knox 已修改 . 還原成這個修訂版本
1 file changed, 6 insertions
yfinance-10.py(檔案已創建)
@@ -0,0 +1,6 @@ | |||
1 | + | import requests_cache | |
2 | + | session = requests_cache.CachedSession('yfinance.cache') | |
3 | + | session.headers['User-agent'] = 'my-program/1.0' | |
4 | + | ticker = yf.Ticker('msft', session=session) | |
5 | + | # The scraped response will be stored in the cache | |
6 | + | ticker.actions |
上一頁
下一頁