Taking a long walk outside with some good music is one of my favorite ways to relax, but I noticed that I only update my playlist every so often. I was thinking of how I could find new music on a regular basis. The answer? With Python, duh! 😉
This application is powered by Selenium and GitHub Actions to deliver weekly music recommendations to my email. I used Selenium to open a headless Chrome webdriver and search Future House Music's YouTube page for their latest and most popular tracks. The resulting information would be stored an array and sent via email using smtplib and some HTML/CSS. To schedule those emails, I used GitHub Actions to run this script every week in the afternoon.
- CSS3
- EmailMessage (Library)
- GitHub Actions
- HTML5
- PyCharm
- Python
- Selenium
- SMTP (Library)
Having never used GitHub Actions before, I was worried my YML file would break during the build process...and it did! A LOT. But each failure and StackOverflow search was an opportunity to experiment and, after a few iterations and tweaks, the workflow managed to run successfully and continues to do so.
I enjoyed developing this project and I'm continually impressed by how much can be done with Selenium and Python. In the future, I would love to find a way to make a nicer looking HTML message without using inline CSS styling to give it that extra polish and flashy feel.