mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-05 19:10:10 +09:00
Extraction tweaks for Comedy Central playlists
Return a single item as a video result; retain the 6-char ID as display_id
This commit is contained in:
parent
5997ce694a
commit
a15f994677
@ -229,6 +229,8 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
if info:
|
if info:
|
||||||
entries.append(info)
|
entries.append(info)
|
||||||
|
|
||||||
|
if len(entries) == 1:
|
||||||
|
return entries[0]
|
||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
entries, playlist_title=title, playlist_description=description)
|
entries, playlist_title=title, playlist_description=description)
|
||||||
|
|
||||||
@ -299,6 +301,8 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
webpage = self._download_webpage(url, title)
|
webpage = self._download_webpage(url, title)
|
||||||
mgid = self._extract_mgid(webpage)
|
mgid = self._extract_mgid(webpage)
|
||||||
videos_info = self._get_videos_info(mgid)
|
videos_info = self._get_videos_info(mgid)
|
||||||
|
if videos_info and videos_info.get('_type') != 'playlist':
|
||||||
|
videos_info['display_id'] = title
|
||||||
return videos_info
|
return videos_info
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user