This Python script allows you to get a list of the top 10 news from the BBC Website.
It displays the headline, and if interested, you can click on the link to read the entire article.
- requests
- python-dotenv
Run the following command to install the python-dotenv module:
pip install python-dotenv
BBC_API in the environment variable must be set by the user with the URL of the API to be used.
- Make a file : .env
- Make a variable BBC_API and assign a value to it :
BBC_PATH="YOUR_API_URL_HERE"
Run the following command to see the headlines, with the respective links, on the command line.
python get_news.py