Skip to content

Instantly share code, notes, and snippets.

@Sunil02324
Last active April 5, 2017 00:04
Show Gist options
  • Save Sunil02324/aa2e9bfa632ee4bb198f611b136221ca to your computer and use it in GitHub Desktop.
Save Sunil02324/aa2e9bfa632ee4bb198f611b136221ca to your computer and use it in GitHub Desktop.
from __future__ import unicode_literals
import youtube_dl
ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s%(ext)s'})
url = raw_input("Give the URL of video which you want to stream? \n")
with ydl:
result = ydl.extract_info(
url,
download=False # We just want to extract the info
)
video = result
print video['formats'][0]['url']
print video['formats'][0]['format']
@Sunil02324
Copy link
Author

videos structure 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment