Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube to stream #7807
youtube to stream #7807
Comments
|
What's a "python stream object"? Can you give some code snippets for what you've tried and what's your expectation? |
|
Typically a stream object is |
|
You can use urlopen, either directly from urllib.urlopen or with YoutubeDL.urlopen: import youtube_dl
ydl = youtube_dl.YoutubeDL({'format': 'best'})
info = ydl.extract_info('http://www.youtube.com/watch?v=BaW_jenozKcj', download=False)
f = ydl.urlopen(info['url'])
try:
print(f.read(100))
finally:
f.close()which produces:
|
Hello,
I would like to know if it is possible to make a python stream object from a youtube video ? If yes, how ?
Thank you for your responses :)