Skip to content

Commit

Permalink
Update down.py
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanthlouis committed Oct 28, 2014
1 parent 02ea926 commit 45ee2e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions down.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import pafy
from Tkinter import Tk
r = Tk()
r.withdraw()
flag=0
result=r.clipboard_get()
type=raw_input("Hit 1 for video,2 for playlist")
type=int(type)
qual=raw_input("Hit 1 for best clarity, 2 for worst, 3 for other")
Expand All @@ -8,7 +12,7 @@
flag=1
c=0
if type==1:
url = "https://www.youtube.com/watch?v=NTNp1IbNLzA"
url = result
video = pafy.new(url)
best = video.streams
for b in best:
Expand All @@ -27,7 +31,7 @@
x=filename.download(filepath=filename.title + "." + filename.extension)

else:
url="http://www.youtube.com/playlist?list=PLs-C3tTf69dlw30_oE0GbT5j_SzZgcugk"
url=result
video=pafy.get_playlist(url)
for i in xrange(1,100):
c=0
Expand Down

1 comment on commit 45ee2e8

@ghostmigi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to execute this script down.py
thank you

Please # to comment.