Skip to content

Commit 17e0c7f

Browse files
Fixed yahoo finance query invalid cookie
#334 hopefully done
1 parent 45c2126 commit 17e0c7f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/util/parse_tweet.py

-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ def parse_tweet(tweet: dict, update_tweet_id: bool = False):
6969
is_long_tweet = False
7070

7171
## TODO: split the below logic up into functions
72-
print(tweet)
73-
print()
7472

7573
# To be able to get the tweet and the reply
7674
if "items" in tweet.keys():

src/util/yf_data.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
##> Imports
22
# > Standard libaries
33
from __future__ import annotations
4-
from typing import Optional, List
4+
5+
from typing import List, Optional
56

67
# > 3rd Party Dependencies
78
from yahooquery import Ticker
89

10+
from util.afterhours import afterHours
11+
912
# Local dependencies
1013
from util.formatting import format_change
11-
from util.afterhours import afterHours
1214
from util.tv_data import tv
1315

1416

1517
def yf_info(ticker: str, do_format_change: bool = True):
1618
# try:
17-
stock_info = Ticker(ticker, asynchronous=True).price
19+
stock_info = Ticker(ticker, asynchronous=False).price
1820

1921
# Test if the ticker is valid
2022
if not isinstance(stock_info.get(ticker), dict):

0 commit comments

Comments
 (0)