Scrapes, and downloads mp3's from the Talk Python To Me website
This is a script that scrapes the website for ALL mp3 episodes, written in Python
- Python 3
- requests package
- Save the Python script into a directory you want the mp3s to save to.
- Open a terminal and navigate to the folder.
- Run: python episodes.py
- OR...open the script in an editor (IDLE or your preferred choice) and execute from there.
- If your not sure which script is which, open one up and read the comments at the top of the file.
So if you haven't already, you should check out their website - it is called "Talk Python To Me" and does weekly podcasts/episodes talking about Python, and includes guest from all areas within the Python community. They are amazing.
Heres the link to the main page: https://talkpython.fm/
The episodes are freely available as mp3 downloads.
I emailed the show, saying I was learning about Python and web-based stuff, and asked Michael Kennedy if he could point me in the right direction with something. I asked if it was possible to use Python to scrape the website for ALL episodes....86 of them
Amazingly he emailed me back with a script, which was aimed at a section of the site with 3 episodes on...and he gave me a hint towards getting it to grab ALL 86 episodes....it was just a case of editing the url.
So I want to put this up for others, I am going to include the 1st version (from Michael Kennedy) that grabs 3 episodes, and also my edited version to grab them all.
If you run the script to grab them ALL, you will need about 4.4 GB of space fo store them all. Each podcast/mp3 is an hour long.
I hope this helps - and gets used, its a single script to download EVERY episode! Awesome!
Ben