Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def fetch_news(ticker):
|
|
23 |
soup = BeautifulSoup(response.text, 'html.parser')
|
24 |
news_table = soup.find(id='news-table')
|
25 |
news = []
|
26 |
-
for row in news_table.findAll('tr')[:
|
27 |
title = row.a.get_text()
|
28 |
link = row.a['href']
|
29 |
news.append({'title': title, 'link': link})
|
|
|
23 |
soup = BeautifulSoup(response.text, 'html.parser')
|
24 |
news_table = soup.find(id='news-table')
|
25 |
news = []
|
26 |
+
for row in news_table.findAll('tr')[:3]: # Fetch up to 50 articles
|
27 |
title = row.a.get_text()
|
28 |
link = row.a['href']
|
29 |
news.append({'title': title, 'link': link})
|