mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
comedycentral: Use media number instead of act number as ID
This commit is contained in:
parent
a88bc6bbd3
commit
5991ddfd7a
12
youtube-dl
12
youtube-dl
|
@ -3089,7 +3089,7 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
}.get(show_id, -ACT_COUNT)
|
}.get(show_id, -ACT_COUNT)
|
||||||
|
|
||||||
first_player_url = mMovieParams[0][0]
|
first_player_url = mMovieParams[0][0]
|
||||||
mediaNum = int(mMovieParams[0][3]) + OFFSET
|
startMediaNum = int(mMovieParams[0][3]) + OFFSET
|
||||||
movieId = mMovieParams[0][1]
|
movieId = mMovieParams[0][1]
|
||||||
|
|
||||||
playerReq = urllib2.Request(first_player_url)
|
playerReq = urllib2.Request(first_player_url)
|
||||||
|
@ -3102,8 +3102,8 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
player_url = playerResponse.geturl()
|
player_url = playerResponse.geturl()
|
||||||
|
|
||||||
for actNum in range(ACT_COUNT):
|
for actNum in range(ACT_COUNT):
|
||||||
actTitle = 'act' + str(actNum+1)
|
mediaNum = startMediaNum + actNum
|
||||||
mediaId = movieId + str(mediaNum + actNum)
|
mediaId = movieId + str(mediaNum)
|
||||||
configUrl = ('http://www.comedycentral.com/global/feeds/entertainment/media/mediaGenEntertainment.jhtml?' +
|
configUrl = ('http://www.comedycentral.com/global/feeds/entertainment/media/mediaGenEntertainment.jhtml?' +
|
||||||
urllib.urlencode({'uri': mediaId}))
|
urllib.urlencode({'uri': mediaId}))
|
||||||
configReq = urllib2.Request(configUrl)
|
configReq = urllib2.Request(configUrl)
|
||||||
|
@ -3121,7 +3121,7 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
turls.append(finfo)
|
turls.append(finfo)
|
||||||
|
|
||||||
if len(turls) == 0:
|
if len(turls) == 0:
|
||||||
self._downloader.trouble(u'\nERROR: unable to download ' + actTitle + ': No videos found')
|
self._downloader.trouble(u'\nERROR: unable to download ' + str(mediaNum) + ': No videos found')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# For now, just pick the highest bitrate
|
# For now, just pick the highest bitrate
|
||||||
|
@ -3131,7 +3131,7 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
|
|
||||||
effTitle = show_id.replace('.com', '') + '-' + epTitle
|
effTitle = show_id.replace('.com', '') + '-' + epTitle
|
||||||
info = {
|
info = {
|
||||||
'id': actTitle,
|
'id': str(mediaNum),
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': show_id,
|
'uploader': show_id,
|
||||||
'upload_date': 'NA',
|
'upload_date': 'NA',
|
||||||
|
@ -3147,7 +3147,7 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
try:
|
try:
|
||||||
self._downloader.process_info(info)
|
self._downloader.process_info(info)
|
||||||
except UnavailableVideoError, err:
|
except UnavailableVideoError, err:
|
||||||
self._downloader.trouble(u'\nERROR: unable to download ' + actTitle)
|
self._downloader.trouble(u'\nERROR: unable to download ' + str(mediaNum))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue