Skip to content

Instantly share code, notes, and snippets.

@Mohamedemad4
Last active August 2, 2017 14:23
Show Gist options
  • Save Mohamedemad4/12020224c35231e7d738a6474cd04087 to your computer and use it in GitHub Desktop.
Save Mohamedemad4/12020224c35231e7d738a6474cd04087 to your computer and use it in GitHub Desktop.
A script to get you torrents of rick and morty S03E02 as soon as the torrent is here
#!/usr/bin/python
#A script to get you torrents of rick and morty S03E02 as soon as the torrent is here
#I used http://patorjk.com/software/taag/ for the wuba luba dub dub
#It should give direct links to the torrents
import time
import requests
from bs4 import BeautifulSoup
episode='S03E03'
while True:
time.sleep(60)
request=requests.get('http://eztv.ag/search/rick-and-morty')
if request.status_code!=200:
raise BaseException('connection Error, Retrying')
continue
html=request.content
soup = BeautifulSoup(html, 'html.parser')
links=[i['href'] for i in soup.find_all('a') if episode in i['href']]
if links==[]:
print 'Not Here yet'
else:
print '''
__ __ __ __ __ _______ __ _______ __
/ | _ / | / | / | / | / \ / | / \ / |
$$ | / \ $$ | __ __ $$ |____ ______ $$ | __ __ $$ |____ ______ $$$$$$$ | __ __ $$ |____ $$$$$$$ | __ __ $$ |____
$$ |/$ \$$ |/ | / |$$ \ / \ $$ | / | / |$$ \ / \ $$ | $$ |/ | / |$$ \ $$ | $$ |/ | / |$$ \
$$ /$$$ $$ |$$ | $$ |$$$$$$$ | $$$$$$ | $$ | $$ | $$ |$$$$$$$ | $$$$$$ | $$ | $$ |$$ | $$ |$$$$$$$ | $$ | $$ |$$ | $$ |$$$$$$$ |
$$ $$/$$ $$ |$$ | $$ |$$ | $$ | / $$ | $$ | $$ | $$ |$$ | $$ | / $$ | $$ | $$ |$$ | $$ |$$ | $$ | $$ | $$ |$$ | $$ |$$ | $$ |
$$$$/ $$$$ |$$ \__$$ |$$ |__$$ |/$$$$$$$ | $$ |_____ $$ \__$$ |$$ |__$$ |/$$$$$$$ | $$ |__$$ |$$ \__$$ |$$ |__$$ | $$ |__$$ |$$ \__$$ |$$ |__$$ |
$$$/ $$$ |$$ $$/ $$ $$/ $$ $$ | $$ |$$ $$/ $$ $$/ $$ $$ | $$ $$/ $$ $$/ $$ $$/ $$ $$/ $$ $$/ $$ $$/
$$/ $$/ $$$$$$/ $$$$$$$/ $$$$$$$/ $$$$$$$$/ $$$$$$/ $$$$$$$/ $$$$$$$/ $$$$$$$/ $$$$$$/ $$$$$$$/ $$$$$$$/ $$$$$$/ $$$$$$$/
'''
for i in links:
if 'http' in i:
print i
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment