mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Fixes the InfoExtractor for the Colbert Report.
This commit is contained in:
parent
feb22fe5fe
commit
4a702f3819
1 changed files with 12 additions and 3 deletions
|
@ -2332,10 +2332,19 @@ def _real_extract(self, url):
|
||||||
epTitle = mobj.group('episode')
|
epTitle = mobj.group('episode')
|
||||||
|
|
||||||
mMovieParams = re.findall('(?:<param name="movie" value="|var url = ")(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"', html)
|
mMovieParams = re.findall('(?:<param name="movie" value="|var url = ")(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"', html)
|
||||||
if len(mMovieParams) == 0:
|
|
||||||
self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
if len(mMovieParams) == 0:
|
||||||
|
# The Colbert Report embeds the information in a without
|
||||||
|
# a URL prefix; so extract the alternate reference
|
||||||
|
# and then add the URL prefix manually.
|
||||||
|
|
||||||
|
altMovieParams = re.findall('data-mgid="([^"]*episode.*?:.*?)"', html)
|
||||||
|
if len(altMovieParams) == 0:
|
||||||
|
self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
mMovieParams = [("http://media.mtvnservices.com/" + altMovieParams[0], altMovieParams[0])]
|
||||||
|
|
||||||
playerUrl_raw = mMovieParams[0][0]
|
playerUrl_raw = mMovieParams[0][0]
|
||||||
self.report_player_url(epTitle)
|
self.report_player_url(epTitle)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue