Skip to content

Commit

Permalink
Merge remote-tracking branch 'github.com/patch-1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianning Li committed Oct 3, 2024
2 parents 67c6530 + 7682c47 commit 1afe901
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions finvizfinance/quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def ticker_news(self):
"""
fullview_news_outer = self.soup.find("table", class_="fullview-news-outer")
rows = fullview_news_outer.find_all("tr")

frame = []
last_date = ""
for row in rows:
Expand All @@ -287,6 +287,7 @@ def ticker_news(self):
news_date = cols[0].text
title = cols[1].a.text
link = cols[1].a["href"]
source = cols[1].span.text
news_time = news_date.split()
if len(news_time) == 2:
last_date = news_time[0]
Expand All @@ -296,7 +297,7 @@ def ticker_news(self):

news_time = format_datetime(news_time)

info_dict = {"Date": news_time, "Title": title, "Link": link}
info_dict = {"Date": news_time, "Title": title, "Link": link, "Source": source[1:-1]}
frame.append(info_dict)
except AttributeError:
pass
Expand Down

0 comments on commit 1afe901

Please sign in to comment.