git://git.jankratochvil.net
/
youtube-dl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f862ea
)
Basic comedycentral (The Daily Show) support (Will work as soon as rtmpdump gets...
author
Philipp Hagemeister
<phihag@phihag.de>
Wed, 7 Sep 2011 20:06:09 +0000
(22:06 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Wed, 7 Sep 2011 20:06:09 +0000
(22:06 +0200)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index
71e7aa8
..
a1245a8
100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-3051,6
+3051,9
@@
class ComedyCentralIE(InfoExtractor):
def report_config_download(self, episode_id):
self._downloader.to_screen(u'[comedycentral] %s: Downloading configuration' % episode_id)
def report_config_download(self, episode_id):
self._downloader.to_screen(u'[comedycentral] %s: Downloading configuration' % episode_id)
+ def report_player_url(self, episode_id):
+ self._downloader.to_screen(u'[comedycentral] %s: Determining player URL' % episode_id)
+
def _simplify_title(self, title):
res = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', title)
res = res.strip(ur'_')
def _simplify_title(self, title):
res = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', title)
res = res.strip(ur'_')
@@
-3076,10
+3079,19
@@
class ComedyCentralIE(InfoExtractor):
self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)
return
ACT_COUNT = 4
self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)
return
ACT_COUNT = 4
- player_url = mMovieParams[0][0]
+
first_
player_url = mMovieParams[0][0]
mediaNum = int(mMovieParams[0][2]) - ACT_COUNT
movieId = mMovieParams[0][1]
mediaNum = int(mMovieParams[0][2]) - ACT_COUNT
movieId = mMovieParams[0][1]
+ playerReq = urllib2.Request(first_player_url)
+ self.report_player_url(epTitle)
+ try:
+ playerResponse = urllib2.urlopen(playerReq)
+ except (urllib2.URLError, httplib.HTTPException, socket.error), err:
+ self._downloader.trouble(u'ERROR: unable to download player: %s' % unicode(err))
+ return
+ player_url = playerResponse.geturl()
+
for actNum in range(ACT_COUNT):
mediaId = movieId + str(mediaNum + actNum)
configUrl = ('http://www.comedycentral.com/global/feeds/entertainment/media/mediaGenEntertainment.jhtml?' +
for actNum in range(ACT_COUNT):
mediaId = movieId + str(mediaNum + actNum)
configUrl = ('http://www.comedycentral.com/global/feeds/entertainment/media/mediaGenEntertainment.jhtml?' +
@@
-3102,7
+3114,7
@@
class ComedyCentralIE(InfoExtractor):
format,video_url = turls[-1]
self._downloader.increment_downloads()
format,video_url = turls[-1]
self._downloader.increment_downloads()
- actTitle =
epTitle + '-
act' + str(actNum+1)
+ actTitle =
'
act' + str(actNum+1)
info = {
'id': epTitle,
'url': video_url,
info = {
'id': epTitle,
'url': video_url,