]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
YoutubePlaylistIE: get *all* videos
authorAnisse Astier <anisse@astier.eu>
Thu, 13 Jun 2013 21:42:48 +0000 (23:42 +0200)
committerAnisse Astier <anisse@astier.eu>
Thu, 13 Jun 2013 21:45:32 +0000 (23:45 +0200)
For that, we add parameter safeSearch=none that asks youtube not filter
results before sending them to us.

Note: this parameter could be added to YoutubeSearchIE and YoutubeUserIE
as well, but I don't know what would be the impact in term of unwanted
results. Maybe expose that as a parameter? For a playlist it's different
since the user chose what she put in the playlist.

youtube_dl/InfoExtractors.py

index 33ba0fdd1be218ae0a5e04348545defeb407b386..39278a2e97e6471fe8f8ea72f4331884969da09c 100755 (executable)
@@ -1544,7 +1544,7 @@ class YoutubePlaylistIE(InfoExtractor):
                      |
                         ((?:PL|EC|UU)[0-9A-Za-z-_]{10,})
                      )"""
-    _TEMPLATE_URL = 'https://gdata.youtube.com/feeds/api/playlists/%s?max-results=%i&start-index=%i&v=2&alt=json'
+    _TEMPLATE_URL = 'https://gdata.youtube.com/feeds/api/playlists/%s?max-results=%i&start-index=%i&v=2&alt=json&safeSearch=none'
     _MAX_RESULTS = 50
     IE_NAME = u'youtube:playlist'