Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3df3b94

Browse files
Merge pull request #24 from parthbansal05/twilio-and-youtube-downloader
Twilio and youtube multithread downloader
2 parents 2fcb55b + 866ba88 commit 3df3b94

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

‎Twilio.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Download the helper library from https://www.twilio.com/docs/python/install
2+
import os
3+
from twilio.rest import Client
4+
5+
account_sid = 'enter-your-sid'
6+
auth_token = 'enter-your-token'
7+
client = Client(account_sid, auth_token)
8+
9+
call = client.calls.create(
10+
twiml='<Response><Play loop="10">https://demo.twilio.com/docs/classic.mp3</Play></Response>',
11+
to='',
12+
from_=''
13+
)
14+
15+
print(call.sid)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# parth bansal
2+
# https://github.com/parthbansal05
3+
from pytube import YouTube
4+
import threading
5+
from tkinter import Tk
6+
import time
7+
8+
update = 0
9+
stop = 0
10+
link = ""
11+
old_cpy_txt = ""
12+
13+
14+
def downloader(link):
15+
try:
16+
vid_obj = YouTube(link)
17+
print("downloading video "+vid_obj.title)
18+
vid_obj = vid_obj.streams.get_highest_resolution()
19+
vid_obj.download()
20+
print("downloaded video "+vid_obj.title)
21+
except:
22+
pass
23+
# print(link)
24+
25+
26+
while stop == 0:
27+
28+
if update == 1:
29+
update = 0
30+
down_ld = threading.Thread(target=downloader, args=(link,)).start()
31+
cpy_txt = Tk().clipboard_get()
32+
if cpy_txt!="testing":
33+
if old_cpy_txt != cpy_txt:
34+
link = cpy_txt
35+
update = 1
36+
old_cpy_txt = cpy_txt
37+
38+
time.sleep(1)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /