}.get(show_id, -ACT_COUNT)
first_player_url = mMovieParams[0][0]
- mediaNum = int(mMovieParams[0][3]) + OFFSET
+ startMediaNum = int(mMovieParams[0][3]) + OFFSET
movieId = mMovieParams[0][1]
playerReq = urllib2.Request(first_player_url)
player_url = playerResponse.geturl()
for actNum in range(ACT_COUNT):
- actTitle = 'act' + str(actNum+1)
- mediaId = movieId + str(mediaNum + actNum)
+ mediaNum = startMediaNum + actNum
+ mediaId = movieId + str(mediaNum)
configUrl = ('http://www.comedycentral.com/global/feeds/entertainment/media/mediaGenEntertainment.jhtml?' +
urllib.urlencode({'uri': mediaId}))
configReq = urllib2.Request(configUrl)
turls.append(finfo)
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
# For now, just pick the highest bitrate
effTitle = show_id.replace('.com', '') + '-' + epTitle
info = {
- 'id': actTitle,
+ 'id': str(mediaNum),
'url': video_url,
'uploader': show_id,
'upload_date': 'NA',
try:
self._downloader.process_info(info)
except UnavailableVideoError, err:
- self._downloader.trouble(u'\nERROR: unable to download ' + actTitle)
+ self._downloader.trouble(u'\nERROR: unable to download ' + str(mediaNum))
continue