mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 00:16:48 +00:00
[iqiyi] Fix playlist detection (#12504)
This commit is contained in:
parent
54f54fcca7
commit
fbf56be213
@ -5,6 +5,7 @@ Core
|
|||||||
* [socks] Handle cases where credentials are required but missing
|
* [socks] Handle cases where credentials are required but missing
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
* [iqiyi] Fix playlist detection (#12504)
|
||||||
- [azubu] Remove extractor (#12813)
|
- [azubu] Remove extractor (#12813)
|
||||||
* [porn91] Fix extraction (#12814)
|
* [porn91] Fix extraction (#12814)
|
||||||
+ [generic] Support Brightcove videos in <iframe> (#12482)
|
+ [generic] Support Brightcove videos in <iframe> (#12482)
|
||||||
|
@ -337,13 +337,16 @@ class IqiyiIE(InfoExtractor):
|
|||||||
url, 'temp_id', note='download video page')
|
url, 'temp_id', note='download video page')
|
||||||
|
|
||||||
# There's no simple way to determine whether an URL is a playlist or not
|
# There's no simple way to determine whether an URL is a playlist or not
|
||||||
# So detect it
|
# Sometimes there are playlist links in individual videos, so treat it
|
||||||
playlist_result = self._extract_playlist(webpage)
|
# as a single video first
|
||||||
if playlist_result:
|
|
||||||
return playlist_result
|
|
||||||
|
|
||||||
tvid = self._search_regex(
|
tvid = self._search_regex(
|
||||||
r'data-player-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid')
|
r'data-player-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid', default=None)
|
||||||
|
if tvid is None:
|
||||||
|
playlist_result = self._extract_playlist(webpage)
|
||||||
|
if playlist_result:
|
||||||
|
return playlist_result
|
||||||
|
raise ExtractorError('Can\'t find any video')
|
||||||
|
|
||||||
video_id = self._search_regex(
|
video_id = self._search_regex(
|
||||||
r'data-player-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id')
|
r'data-player-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user