Unlock Financial News with Python: Stay Ahead of the Market.

Getting Financial News for trading.

If you are a busy finance manager and time really means money for you most probaly you don't have time for internet browsing and it's good idea to use Python to obtain hot financial news in one shot.

The Python script below will make a HTTP request to Business News Today which provides breaking business news updates, live share market news, trending business news, stocks, IPO, finance, economy, crypto stories on Business Today....

Extracting Financial News.
Extracting Financial News meme.

Python Knowledge Base: Make coding great again.
- Updated: 2024-07-23 by Andrey BRATUS, Senior Data Analyst.

Extracted information is scraped and postprocessed in BeautifulSoup, so you will need to install this library. The script below can be easily modified to obtain necessary financial information from any business news website of your choice, you can also adjust the number of news displayed and lenght of text in lines.

Python code to extract Financial News:

from bs4 import BeautifulSoup as BS
import requests as req
sourceurl = "https://www.businesstoday.in/latest/economy"
web_page = req.get(sourceurl)
BS_web_page = BS(web_page.content, "html.parser")
M = 1
for link in BS_web_page.find_all('a'):
    if(str(type(link.string)) == ""
       and len(link.string) > 25):
        print(str(M)+".", link.string)
        M += 1

Financial News extraction output:

1. Indian High Commission condemns violence against Indian community, temple attack in UK's Leicester
2. Finance Ministry calls meeting of PSU bank chiefs on Sep 21 to take stock of vacancies, recruitment plan
3. RBl slaps monetary penalty on 3 banks for non-compliance. Check details
4. India, Saudi Arabia discuss Rupee-Riyal trade, UPI payment system
5. EXCLUSIVE: Centre finalising stance on cryptocurrencies as FATF discussions loom
6. 'Sign of economic revival': Gross direct tax collections rise 30% to Rs 8.36 lakh crore in FY 23
7. 'Accept offence, pay fine, avoid prison': I-T dept's new pragmatic rule
8. Banks must ensure their staff speaks local language in branches: FM Sitharaman
9. PM launches National Logistics Policy; experts say it will provide 'Cheetah Speed' to industry
10. Heightened International focus on energy security in advanced nations could elevate geographical tensions: Fin Min
11. Trade invoicing, payment, settlement of trade can be done in Rupee: DGFT
12. Govt reduces windfall tax on crude oil from Rs 13,000 to Rs 10,500 per tonne
13. Girl power on company boards: It’s a two-way street between India Inc and the women, says FM
14. India needs drone trackers to ensure national security, says outgoing civil aviation ministry official
15. The day FM Nirmala Sitharaman entered the BSE Hall for the first time
16. Gautam Adani briefly becomes 2nd richest person; falls back to third spot
17. Govt’s ambitious new policy on logistics will be unveiled on Sept 17; all you need to know
18. PM Modi to meet Putin, Jinping on the sidelines of SCO summit 2022 in Samarkand; details here
19. Rupee falls 11 paise to 79.82 against US dollar in early trade
20. Govt revises definition of small companies; increases paid up capital threshold from Rs 2 cr to Rs 4 cr
21. Nitin Gadkari says sale of petrol, diesel vehicles must be discouraged
22. Add Business Today to Home Screen

See also related topics: