Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

關於yahoo_new小程式 #33

Open
erichuang888 opened this issue Jul 19, 2022 · 2 comments
Open

關於yahoo_new小程式 #33

erichuang888 opened this issue Jul 19, 2022 · 2 comments

Comments

@erichuang888
Copy link

您好:
我在練習3_buy_with_price_fall.py這只程式時
因為有用到get_yahoo_news這個程式
我知道yahoo已經有改版了
所以改寫了下列程式碼
data = requests.get(f"https://tw.stock.yahoo.com/quote/{stock}/news",headers=headers)
但最後呈現的結果是
title url date
0 Error Error Error
是下面的程式都要一併改寫嗎?
能否請板主再放上一個改版後的程式提供參考
謝謝

@arleigh418
Copy link
Owner

Hi 您好,
因為get_yahoo_news已經失效,所以您嘗試看看將get_yahoo_news2的貼去utility.py裡面,然後使用get_yahoo_news2()這一只程式來獲取新聞,看看是不是有效,有問題請再提出哦。

@erichuang888
Copy link
Author

可以了
謝謝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants