Fix documentation example (add missing import) (#1496)
Browse files- docs/user/exceptions.rst +1 -0
docs/user/exceptions.rst
CHANGED
@@ -13,6 +13,7 @@ videos in a playlist, videos that are region-restricted, and more.
|
|
13 |
Let's see what your code might look like if you need to do exception handling::
|
14 |
|
15 |
>>> from pytube import Playlist, YouTube
|
|
|
16 |
>>> playlist_url = 'https://youtube.com/playlist?list=special_playlist_id'
|
17 |
>>> p = Playlist(playlist_url)
|
18 |
>>> for url in p.video_urls:
|
|
|
13 |
Let's see what your code might look like if you need to do exception handling::
|
14 |
|
15 |
>>> from pytube import Playlist, YouTube
|
16 |
+
>>> from pytube.exceptions import VideoUnavailable
|
17 |
>>> playlist_url = 'https://youtube.com/playlist?list=special_playlist_id'
|
18 |
>>> p = Playlist(playlist_url)
|
19 |
>>> for url in p.video_urls:
|