This Python script scrapes the latest news from security.nl and generates an HTML page with the news items, including a summary of each article. The script uses the Beautiful Soup library to extract the news items and summaries from the HTML source code of the website.
The generated HTML page includes the following information for each news item:
- Title
- Summary (fetched by extracting the first paragraph of the article)
- Link to the article
The script also includes some basic CSS styling to make the HTML output more visually appealing.
Created by Joe Shenouda (www.shenouda.nl)
To run the script, you need to have the following software installed:
- Python 3.x
- Beautiful Soup
You can install Beautiful Soup using pip:
pip install beautifulsoup4
- Clone the repository or download the script file
security.py
. - Open a terminal or command prompt window and navigate to the directory where the script is located.
- Run the following command to generate the HTML file:
python security.py
The script will generate an HTML file named news.html
in the same directory.
- Open the
news.html
file in a web browser to view the formatted output.
This script is licensed under the MIT License.
If you would like to support this project, you can make a donation through PayPal:
Don't forget to give this repo a ✨ STAR!
Have fun! Joe