(self)
| 310 | super(YouTubeVideo, self).__init__(src, width, height, **kwargs) |
| 311 | |
| 312 | def _repr_jpeg_(self): |
| 313 | # Deferred import |
| 314 | from urllib.request import urlopen |
| 315 | |
| 316 | try: |
| 317 | return urlopen("https://img.youtube.com/vi/{id}/hqdefault.jpg".format(id=self.id)).read() |
| 318 | except IOError: |
| 319 | return None |
| 320 | |
| 321 | class VimeoVideo(IFrame): |
| 322 | """ |