- Python
- Virtual Studio Code (21H2)
Import these two libraries in order to parse the data from the sites:
I then create a function with a menu for the user to select from of listed websites by inputting an integer value:
The feedparser parses through the websites based on the input of the user, the loop then adds the 5 most recent links and titles into the array. Format the article from the list:
When the user wants to open the website link, they input a number 1-5 of which link they want to open. The while loop takes the input as an integer, then uses the webbrowser import to open the desired link:
Then I formatted to make it more user friendly:
Now lets run it!:
After making a choice it lists out 5 recent articles, then prompts which we'd like to open:
As you can see, once the code executes it opens up your selection in a web browser:
This Concludes This Autoomation Python Script Project!
NOTE: You can add onto this and make it more complex, or use these methonds to automate other tasks!