Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying a Youtube clip in python

Tags:

python

ipython

I am new to python, and attempting to load a short clip in my python code. Is there is a way on displaying a youtube (or any other url support code) clip via python command? Something like iframe tag with src of HTML?

Thanks

like image 610
David Rasuli Avatar asked Dec 05 '14 11:12

David Rasuli


1 Answers

Your question is tagged ipython, and IPython does allow you to embed a YouTube video in the notebook,

from IPython.display import YouTubeVideo
# a talk about IPython at Sage Days at U. Washington, Seattle.
# Video credit: William Stein.
YouTubeVideo('1j_HxD4iLn8')

See live example here: http://nbviewer.ipython.org/github/ipython/ipython/blob/1.x/examples/notebooks/Part%205%20-%20Rich%20Display%20System.ipynb#Video

like image 100
bakkal Avatar answered Sep 28 '22 01:09

bakkal