mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
[iqiyi] Fix extraction of Yule videos
This commit is contained in:
parent
290f64dbaa
commit
01cb57016f
|
@ -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 extraction of Yule videos
|
||||||
* [iqiyi] Fix playlist detection (#12504)
|
* [iqiyi] Fix playlist detection (#12504)
|
||||||
- [azubu] Remove extractor (#12813)
|
- [azubu] Remove extractor (#12813)
|
||||||
* [porn91] Fix extraction (#12814)
|
* [porn91] Fix extraction (#12814)
|
||||||
|
|
|
@ -189,7 +189,11 @@ class IqiyiIE(InfoExtractor):
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://yule.iqiyi.com/pcb.html',
|
'url': 'http://yule.iqiyi.com/pcb.html',
|
||||||
'only_matching': True,
|
'info_dict': {
|
||||||
|
'id': '4a0af228fddb55ec96398a364248ed7f',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': '第2017-04-21期 女艺人频遭极端粉丝骚扰',
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
# VIP-only video. The first 2 parts (6 minutes) are available without login
|
# VIP-only video. The first 2 parts (6 minutes) are available without login
|
||||||
# MD5 sums omitted as values are different on Travis CI and my machine
|
# MD5 sums omitted as values are different on Travis CI and my machine
|
||||||
|
@ -340,7 +344,7 @@ def _real_extract(self, url):
|
||||||
# Sometimes there are playlist links in individual videos, so treat it
|
# Sometimes there are playlist links in individual videos, so treat it
|
||||||
# as a single video first
|
# as a single video first
|
||||||
tvid = self._search_regex(
|
tvid = self._search_regex(
|
||||||
r'data-player-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid', default=None)
|
r'data-(?:player|shareplattrigger)-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid', default=None)
|
||||||
if tvid is None:
|
if tvid is None:
|
||||||
playlist_result = self._extract_playlist(webpage)
|
playlist_result = self._extract_playlist(webpage)
|
||||||
if playlist_result:
|
if playlist_result:
|
||||||
|
@ -348,7 +352,7 @@ def _real_extract(self, url):
|
||||||
raise ExtractorError('Can\'t find any video')
|
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|shareplattrigger)-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id')
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
|
@ -380,7 +384,8 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
title = (get_element_by_id('widget-videotitle', webpage) or
|
title = (get_element_by_id('widget-videotitle', webpage) or
|
||||||
clean_html(get_element_by_attribute('class', 'mod-play-tit', webpage)))
|
clean_html(get_element_by_attribute('class', 'mod-play-tit', webpage)) or
|
||||||
|
self._html_search_regex(r'<span[^>]+data-videochanged-title="word"[^>]*>([^<]+)</span>', webpage, 'title'))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in a new issue