Project Overview 💡
In this project, you’ll build a simple Python script that scrapes the latest news headlines from Al Jazeera’s news page and stores them in a CSV file. You’ll use requests
, BeautifulSoup
, and pandas
—a powerful combo for web scraping and data handling.
Challenge Yourself! 🚀
Before checking the solution, try writing a script that scrapes headlines from a webpage and saves them into a CSV.
Task:
Write a Python program that:
Fetches HTML content from a news site
Parses the page for headline tags
Cleans and extracts the text
Saves the headlines to a CSV file
Expected Output: The program should scrape the news headlines from the news website and save them in a CSV file:
The program should also print out a message in the terminal indicating the number of headlines saved (i.e., 14):
Give it a shot! Scroll down when you're ready for the step-by-step guide.