diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-04-04 01:11:47 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-04-04 01:11:47 -0700 |
| commit | a736da57f084017ac17e06cd9db19b1fd166e1a6 (patch) | |
| tree | 55a9e83b31f6bdc176731125de0cc42668daf988 /play_video_online.cgi | |
first
Diffstat (limited to 'play_video_online.cgi')
| -rwxr-xr-x | play_video_online.cgi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/play_video_online.cgi b/play_video_online.cgi new file mode 100755 index 0000000..ef3b0ad --- /dev/null +++ b/play_video_online.cgi @@ -0,0 +1,22 @@ +#!/usr/bin/python +# +import cgi +from sys import path + +path.append("protected/vendor/youtube-dl") +import youtube_dl + +form = cgi.FieldStorage() +if "url" not in form: + print( "ERROR: Url not sent"); + exit; +#print "URL:", form["url"].value + +videoUrl = form["url"].value; + +print "Content-Type: video/mp4" +print +youtube_dl.main(["-q", videoUrl]) + +def getFilenameFromUrl(url): + pass |
