Created
November 8, 2019 21:22
-
-
Save neoplacer/2e58a6c0481b470553f4644aae9340e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pycurl | |
import os.path | |
import sys | |
import wget | |
from bs4 import BeautifulSoup | |
if __name__ == '__main__': | |
#Get the rss feed with the list of items | |
if len(sys.argv) < 2: | |
print "Error: you didn't give the xml file with the RSS info. Exiting." | |
exit() | |
rss_xml = open(sys.argv[1]) | |
parser = BeautifulSoup(rss_xml.read(), "lxml") | |
rss_xml.close() | |
episodes = parser.findAll("item") | |
for podcast in episodes: | |
print podcast.enclosure['url'] | |
url = str(podcast.enclosure['url']) | |
wget.download(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment