Last active
August 29, 2015 14:00
-
-
Save tom-henderson/4a3962220360fe432e54 to your computer and use it in GitHub Desktop.
Get magnet links from an eztv show page
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 BeautifulSoup | |
import requests | |
import subprocess | |
url = "http://eztv.it/shows/385/louie/" | |
html = requests.get(url).text | |
soup = BeautifulSoup.BeautifulSoup(html) | |
links = soup.findAll(title="Magnet Link") | |
urls = [link.get('href') for link in links] | |
for url in urls: | |
subprocess.Popen(['open', url]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment