├── gitignore~ ├── .gitignore ├── clipboard ├── clipboard └── clipboard.py ├── imager ├── charlize theron │ ├── 0 │ ├── 1 │ ├── 2 │ ├── 3 │ ├── 4 │ ├── 5 │ ├── 6 │ ├── 7 │ ├── 8 │ ├── 9 │ ├── 10 │ ├── 11 │ ├── 12 │ ├── 13 │ ├── 14 │ ├── 15 │ ├── 16 │ ├── 17 │ ├── 18 │ └── 19 └── imager.py ├── pexels ├── nature │ ├── pexels-photo-medium.jpg │ ├── pexels-photo-27714-medium.jpg │ ├── pexels-photo-130879-medium.jpeg │ ├── pexels-photo-38136-medium.jpeg │ ├── pexels-photo-46082-medium.jpeg │ ├── pexels-photo-58557-medium.jpeg │ ├── dawn-nature-sunset-trees-medium.jpg │ ├── lion-wild-africa-african-medium.jpg │ ├── nature-forest-trees-fog-medium.jpeg │ ├── nature-forest-industry-rails-medium.jpg │ ├── dawn-landscape-mountains-nature-medium.jpg │ ├── photo-1444703686981-a3abbc4d4fe3-medium.jpeg │ ├── delicate-arch-night-stars-landscape-medium.jpg │ ├── italian-landscape-mountains-nature-medium.jpg │ └── bora-bora-french-polynesia-sunset-ocean-medium.jpg └── pexels.py ├── opensites ├── list.txt └── opensites.py ├── music ├── torrent.py └── music.py ├── xkcd ├── xkcd_sort.py └── xkcd.py ├── sarah └── sarah.py ├── cartoon └── cartoon.py └── torrent └── torrent.py /gitignore~: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /xkcd/xkcd 2 | -------------------------------------------------------------------------------- /clipboard/clipboard: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/clipboard/clipboard -------------------------------------------------------------------------------- /imager/charlize theron/0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/0 -------------------------------------------------------------------------------- /imager/charlize theron/1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/1 -------------------------------------------------------------------------------- /imager/charlize theron/10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/10 -------------------------------------------------------------------------------- /imager/charlize theron/11: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/11 -------------------------------------------------------------------------------- /imager/charlize theron/12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/12 -------------------------------------------------------------------------------- /imager/charlize theron/13: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/13 -------------------------------------------------------------------------------- /imager/charlize theron/14: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/14 -------------------------------------------------------------------------------- /imager/charlize theron/15: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/15 -------------------------------------------------------------------------------- /imager/charlize theron/16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/16 -------------------------------------------------------------------------------- /imager/charlize theron/17: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/17 -------------------------------------------------------------------------------- /imager/charlize theron/18: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/18 -------------------------------------------------------------------------------- /imager/charlize theron/19: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/19 -------------------------------------------------------------------------------- /imager/charlize theron/2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/2 -------------------------------------------------------------------------------- /imager/charlize theron/3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/3 -------------------------------------------------------------------------------- /imager/charlize theron/4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/4 -------------------------------------------------------------------------------- /imager/charlize theron/5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/5 -------------------------------------------------------------------------------- /imager/charlize theron/6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/6 -------------------------------------------------------------------------------- /imager/charlize theron/7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/7 -------------------------------------------------------------------------------- /imager/charlize theron/8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/8 -------------------------------------------------------------------------------- /imager/charlize theron/9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/imager/charlize theron/9 -------------------------------------------------------------------------------- /pexels/nature/pexels-photo-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/pexels-photo-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/pexels-photo-27714-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/pexels-photo-27714-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/pexels-photo-130879-medium.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/pexels-photo-130879-medium.jpeg -------------------------------------------------------------------------------- /pexels/nature/pexels-photo-38136-medium.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/pexels-photo-38136-medium.jpeg -------------------------------------------------------------------------------- /pexels/nature/pexels-photo-46082-medium.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/pexels-photo-46082-medium.jpeg -------------------------------------------------------------------------------- /pexels/nature/pexels-photo-58557-medium.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/pexels-photo-58557-medium.jpeg -------------------------------------------------------------------------------- /pexels/nature/dawn-nature-sunset-trees-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/dawn-nature-sunset-trees-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/lion-wild-africa-african-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/lion-wild-africa-african-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/nature-forest-trees-fog-medium.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/nature-forest-trees-fog-medium.jpeg -------------------------------------------------------------------------------- /pexels/nature/nature-forest-industry-rails-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/nature-forest-industry-rails-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/dawn-landscape-mountains-nature-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/dawn-landscape-mountains-nature-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/photo-1444703686981-a3abbc4d4fe3-medium.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/photo-1444703686981-a3abbc4d4fe3-medium.jpeg -------------------------------------------------------------------------------- /pexels/nature/delicate-arch-night-stars-landscape-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/delicate-arch-night-stars-landscape-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/italian-landscape-mountains-nature-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/italian-landscape-mountains-nature-medium.jpg -------------------------------------------------------------------------------- /pexels/nature/bora-bora-french-polynesia-sunset-ocean-medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rounakbanik/pythonutils_online/HEAD/pexels/nature/bora-bora-french-polynesia-sunset-ocean-medium.jpg -------------------------------------------------------------------------------- /opensites/list.txt: -------------------------------------------------------------------------------- 1 | https://www.linkedin.com/ 2 | https://www.facebook.com/?_rdr 3 | https://www.goodreads.com/ 4 | https://www.quora.com/ 5 | https://mail.google.com/mail/u/0/#inbox 6 | https://github.com/ 7 | https://theblackswansongs.wordpress.com/ 8 | https://www.reddit.com/ -------------------------------------------------------------------------------- /opensites/opensites.py: -------------------------------------------------------------------------------- 1 | #Opens a list of websites that you visit regularly 2 | #Upload your list of frequently visited websites in 'list.txt'. Running the script will open all the websites in your default browser. 3 | 4 | import webbrowser 5 | 6 | with open("list.txt") as f: 7 | for line in f: 8 | line = line.split() 9 | webbrowser.open(line[0]) -------------------------------------------------------------------------------- /music/torrent.py: -------------------------------------------------------------------------------- 1 | #! python3 2 | import os, sys, twilio, smtplib, imapclient, pyzmail 3 | 4 | bot_email = "botrony@gmail.com" 5 | bot_password = "playmistyforme" 6 | 7 | my_email = "rounakbanik@gmail.com" 8 | 9 | smtp_server = "smtp.gmail.com" 10 | imap_server = "imap.gmail.com" 11 | 12 | #Check Bot E-Mail for any new instructions. 13 | imapObj = imapclient.IMAPClient(imap_server, ssl=True) 14 | imapObj.login(bot_email, bot_password) -------------------------------------------------------------------------------- /xkcd/xkcd_sort.py: -------------------------------------------------------------------------------- 1 | import os, sys, shutil 2 | 3 | counter = 0 4 | volume = 0 5 | for filename in os.listdir("xkcd"): 6 | if counter%200 == 0: 7 | volume = volume + 1 8 | os.makedirs("xkcd_" + str(volume), exist_ok=True) 9 | 10 | shutil.copy2("xkcd/" + str(filename), "xkcd_" + str(volume) + "/" + str(filename)) 11 | counter = counter + 1 12 | 13 | print("Done.") 14 | print(volume) 15 | 16 | for i in range(1, volume+1): 17 | os.chdir("xkcd_" + str(i)) 18 | pdf_name = "xkcd_" + str(i) + ".pdf" 19 | os.system("convert *.jpg *.gif *.png " + str(pdf_name)) 20 | os.chdir("..") 21 | print(pdf_name + " is complete.") 22 | 23 | 24 | -------------------------------------------------------------------------------- /clipboard/clipboard.py: -------------------------------------------------------------------------------- 1 | #A Simple Mutliuser clipboard. 2 | 3 | import shelve 4 | import pyperclip 5 | import sys 6 | 7 | clipboard_shelf = shelve.open('clipboard') 8 | 9 | if len(sys.argv) == 3: 10 | if sys.argv[1].lower() == 'delete': 11 | if sys.argv[2] in clipboard_shelf: 12 | del clipboard_shelf[sys.argv[2]] 13 | print str(sys.argv[2]) + " has been deleted." 14 | else: 15 | print "The given keyword doesn't exist!" 16 | elif sys.argv[1].lower() == 'save': 17 | clipboard_shelf[sys.argv[2].lower()] = pyperclip.paste() 18 | print str(sys.argv[2]) + " has been added to yor multiclipboard." 19 | else: 20 | print "Invalid command." 21 | 22 | elif len(sys.argv) == 2: 23 | if sys.argv[1].lower() == 'list': 24 | print "List of keywords: " + str(list(clipboard_shelf.keys())) 25 | elif sys.argv[1].lower() in clipboard_shelf: 26 | pyperclip.copy(clipboard_shelf[sys.argv[1]]) 27 | else: 28 | print "Keyword does not exist." 29 | 30 | else: 31 | print "Invalid command." 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /pexels/pexels.py: -------------------------------------------------------------------------------- 1 | #Use Python 3 to run script 2 | import bs4, requests, os, sys 3 | 4 | url = "https://www.pexels.com/search/" 5 | 6 | if len(sys.argv) >= 2: 7 | search_item = ' '.join(sys.argv[1:]) 8 | else: 9 | print("Invalid command") 10 | sys.exit() 11 | 12 | url = url + search_item 13 | os.makedirs(search_item, exist_ok= True) 14 | 15 | res = requests.get(url) 16 | res.raise_for_status() 17 | 18 | soup = bs4.BeautifulSoup(res.text) 19 | images = soup.select("article a img") 20 | 21 | if images == []: 22 | print("No images found. Try different keywords.") 23 | else: 24 | for image in images: 25 | img_src = image.get('src') 26 | print("Dowlaoding image %s"% (img_src)) 27 | 28 | image_req = requests.get(img_src) 29 | image_req.raise_for_status() 30 | 31 | image_file = open(os.path.join(search_item, os.path.basename(img_src)), 'wb') 32 | for chunk in image_req.iter_content(100000): 33 | image_file.write(chunk) 34 | image_file.close() 35 | 36 | print("Download complete.") 37 | 38 | 39 | -------------------------------------------------------------------------------- /imager/imager.py: -------------------------------------------------------------------------------- 1 | #Use Python 3 to run script 2 | import bs4, requests, os, sys 3 | 4 | url = "https://www.google.com/search?tbm=isch&q=" 5 | 6 | if len(sys.argv) >= 2: 7 | search_item = ' '.join(sys.argv[1:]) 8 | else: 9 | print("Invalid command") 10 | sys.exit() 11 | 12 | url = url + search_item 13 | os.makedirs(search_item, exist_ok= True) 14 | 15 | res = requests.get(url) 16 | res.raise_for_status() 17 | 18 | soup = bs4.BeautifulSoup(res.text) 19 | images = soup.select("img") 20 | print(images) 21 | 22 | if images == []: 23 | print("No images found. Try different keywords.") 24 | else: 25 | counter = 0 26 | for image in images: 27 | img_src = image.get('src') 28 | print("Dowlaoding image %s"% (img_src)) 29 | 30 | image_req = requests.get(img_src) 31 | image_req.raise_for_status() 32 | 33 | image_file = open(os.path.join(search_item, str(counter)), 'wb') 34 | for chunk in image_req.iter_content(100000): 35 | image_file.write(chunk) 36 | image_file.close() 37 | 38 | counter = counter + 1 39 | 40 | print("Download complete.") 41 | 42 | 43 | -------------------------------------------------------------------------------- /xkcd/xkcd.py: -------------------------------------------------------------------------------- 1 | #Use Python 3 to run script 2 | import bs4, requests, os, sys 3 | 4 | url = 'http://xkcd.com/' 5 | home = 'http:' 6 | os.makedirs('xkcd', exist_ok=True) 7 | 8 | while not url.endswith('#'): 9 | print('Downloading page %s...' % url) 10 | res = requests.get(url) 11 | res.raise_for_status() 12 | soup = bs4.BeautifulSoup(res.text) 13 | 14 | comicElem = soup.select('#comic img') 15 | if comicElem == []: 16 | print('Could not find an image.') 17 | else: 18 | comicUrl = home + comicElem[0].get('src') 19 | 20 | if os.path.exists(os.path.join('xkcd', os.path.basename(comicUrl))): 21 | print("Repository up to date.") 22 | sys.exit() 23 | 24 | print('Downloading image %s...' % (comicUrl)) 25 | res = requests.get(comicUrl) 26 | res.raise_for_status() 27 | 28 | imageFile = open(os.path.join('xkcd', os.path.basename(comicUrl)), 'wb') 29 | for chunk in res.iter_content(100000): 30 | imageFile.write(chunk) 31 | imageFile.close() 32 | 33 | prevLink = soup.select('a[rel="prev"]')[0] 34 | url = 'http://xkcd.com' + prevLink.get('href') 35 | 36 | print('Done.') 37 | -------------------------------------------------------------------------------- /music/music.py: -------------------------------------------------------------------------------- 1 | #Use Python 3 to run script. 2 | from __future__ import unicode_literals 3 | import bs4, requests, os, sys, time 4 | import youtube_dl 5 | 6 | if len(sys.argv) == 1: 7 | print("Invalid Command. Enter Search Terms.") 8 | sys.exit() 9 | 10 | home_url = "https://www.youtube.com" 11 | 12 | os.makedirs("Music", exist_ok=True) 13 | search_term = ' '.join(sys.argv[1:]) 14 | url = "https://www.youtube.com/results?search_query=" + search_term 15 | 16 | res = requests.get(url) 17 | res.raise_for_status() 18 | 19 | soup = bs4.BeautifulSoup(res.text) 20 | 21 | search_results = soup.select("h3 a") 22 | video_title = search_results[0].get("title") 23 | video_url = home_url + search_results[0].get("href") 24 | 25 | print("Downloading audio from %s"%(video_url)) 26 | 27 | os.chdir("Music") 28 | ydl_opts = { 29 | 'format': 'bestaudio/best', 30 | 'postprocessors': [{ 31 | 'key': 'FFmpegExtractAudio', 32 | 'preferredcodec': 'mp3', 33 | 'preferredquality': '192', 34 | }], 35 | } 36 | with youtube_dl.YoutubeDL(ydl_opts) as ydl: 37 | ydl.download([video_url]) 38 | 39 | print("Dowload Complete.") 40 | 41 | 42 | -------------------------------------------------------------------------------- /sarah/sarah.py: -------------------------------------------------------------------------------- 1 | #Use Python 3 to run script 2 | import bs4, requests, os, sys 3 | 4 | home = "http://sarahcandersen.com" 5 | url = "http://sarahcandersen.com/" 6 | os.makedirs("sarahscribbles", exist_ok=True) 7 | 8 | while True: 9 | res = requests.get(url) 10 | res.raise_for_status() 11 | 12 | soup = bs4.BeautifulSoup(res.text) 13 | 14 | checker = soup.select("article") 15 | 16 | image_list = soup.select("article img") 17 | #print(image_list) 18 | 19 | if image_list == []: 20 | print("Could not find an image.") 21 | else: 22 | image = image_list[0] 23 | img_src = image.get("src") 24 | 25 | image_req = requests.get(img_src) 26 | image_req.raise_for_status() 27 | print("Downloading image %s"% (img_src)) 28 | 29 | image_file = open(os.path.join('sarahscribbles', os.path.basename(img_src)), 'wb') 30 | for chunk in image_req.iter_content(100000): 31 | image_file.write(chunk) 32 | image_file.close() 33 | 34 | url_list = soup.select("#pagination a") 35 | 36 | if len(url_list) == 2 and url != home + "/": 37 | print("Download Complete") 38 | sys.exit() 39 | 40 | url = home + url_list[0].get("href") 41 | print("URL: " + str(url)) 42 | 43 | print("Download complete.") 44 | -------------------------------------------------------------------------------- /cartoon/cartoon.py: -------------------------------------------------------------------------------- 1 | #Use Python 3 to run script. 2 | import bs4, requests, os, sys, time 3 | from selenium import webdriver 4 | 5 | home_url = "*************" 6 | print("Enter the Series' URL: ") 7 | #cartoon_url = "http://kisscartoon.me/Cartoon/Dexter-s-Laboratory-Season-01" 8 | cartoon_url = input() 9 | os.makedirs(os.path.basename(cartoon_url), exist_ok=True) 10 | 11 | browser = webdriver.Firefox() 12 | browser.get(cartoon_url) 13 | time.sleep(8) 14 | res = browser.page_source 15 | 16 | 17 | soup = bs4.BeautifulSoup(res) 18 | videos = soup.select("tr td a") 19 | 20 | for video in videos: 21 | video_url = home_url + video.get("href") 22 | browser.get(video_url) 23 | time.sleep(5) 24 | video_url_source = browser.page_source 25 | video_soup = bs4.BeautifulSoup(video_url_source) 26 | 27 | vid = video_soup.select("video") 28 | vid_src = vid[0].get("src") 29 | 30 | print("Downloading from %s"% (vid_src)) 31 | episode = requests.get(vid_src) 32 | episode.raise_for_status() 33 | 34 | epi_file = open(os.path.join(os.path.basename(cartoon_url), os.path.basename(video_url)), 'wb') 35 | for chunk in episode.iter_content(100000): 36 | epi_file.write(chunk) 37 | epi_file.close() 38 | print("Download of %s complete"%(os.path.basename(video_url))) 39 | 40 | webdriver.quit() 41 | print("COngratulations! The Series has been downloaded. Have fun!") -------------------------------------------------------------------------------- /torrent/torrent.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os, sys, smtplib, imapclient, pyzmail, subprocess 3 | from twilio.rest import TwilioRestClient 4 | 5 | bot_email = "************" 6 | bot_password = "***********" 7 | 8 | smtp_server = "***********" 9 | imap_server = "***********" 10 | 11 | #Check Bot E-Mail for any new instructions. 12 | imapObj = imapclient.IMAPClient(imap_server, ssl=True) 13 | imapObj.login(bot_email, bot_password) 14 | imapObj.select_folder('INBOX', readonly=False) 15 | 16 | UIDs = imapObj.search([u'FROM', u'*************']) 17 | print(UIDs) 18 | 19 | rawMessages = imapObj.fetch(UIDs, ['BODY[]', 'FLAGS']) 20 | 21 | links = [] 22 | torrent_uids = [] 23 | for UID in UIDs: 24 | message = pyzmail.PyzMessage.factory(rawMessages[UID][b'BODY[]']) 25 | if message.get_subject().lower() == "torrent": 26 | #print(message.get_subject()) 27 | link = message.text_part.get_payload().decode(message.text_part.charset) 28 | links.append(link) 29 | torrent_uids.append(UID) 30 | 31 | if len(links) == 0: 32 | sys.exit() 33 | 34 | imapObj.delete_messages(torrent_uids) 35 | imapObj.expunge() 36 | 37 | imapObj.logout() 38 | 39 | subprocess.Popen(['/usr/bin/deluge'] + links) 40 | 41 | smtpObj = smtplib.SMTP(smtp_server, 587) 42 | smtpObj.ehlo() 43 | smtpObj.starttls() 44 | smtpObj.login(bot_email, bot_password) 45 | 46 | smtpObj.sendmail(bot_email, '************', 47 | 'Subject: Instruction Received. \nI have received the magnet link.\n Deluge has been opened and is currently downloading.\nHave a nice day!') 48 | smtpObj.quit() 49 | 50 | accountSID = '******************************' 51 | authToken = '*******************************' 52 | 53 | twilioCli = TwilioRestClient(accountSID, authToken) 54 | myTwilioNumber = '**********' 55 | myCellPhone = '**********' 56 | 57 | message = twilioCli.messages.create(body='Your Instruction has been received. Torrent is downloading. Have a nice day!', 58 | from_=myTwilioNumber, to=myCellPhone) 59 | --------------------------------------------------------------------------------