mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-29 13:44:52 +00:00
[extractor] Add convinience function _yes_playlist
This commit is contained in:
@@ -165,14 +165,10 @@ class NBAWatchIE(NBAWatchBaseIE):
|
||||
def _real_extract(self, url):
|
||||
display_id = self._match_id(url)
|
||||
collection_id = parse_qs(url).get('collection', [None])[0]
|
||||
if collection_id:
|
||||
if self.get_param('noplaylist'):
|
||||
self.to_screen('Downloading just video %s because of --no-playlist' % display_id)
|
||||
else:
|
||||
self.to_screen('Downloading playlist %s - add --no-playlist to just download video' % collection_id)
|
||||
return self.url_result(
|
||||
'https://www.nba.com/watch/list/collection/' + collection_id,
|
||||
NBAWatchCollectionIE.ie_key(), collection_id)
|
||||
if self._yes_playlist(collection_id, display_id):
|
||||
return self.url_result(
|
||||
'https://www.nba.com/watch/list/collection/' + collection_id,
|
||||
NBAWatchCollectionIE.ie_key(), collection_id)
|
||||
return self._extract_video('seoName', display_id)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user