mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-09-08 09:35:01 +00:00
Add tests for ComedyCentral IE
This commit is contained in:
parent
32635ec685
commit
7717ae19fa
|
@ -160,5 +160,39 @@
|
||||||
"params": {
|
"params": {
|
||||||
"skip_download": true
|
"skip_download": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ComedyCentral",
|
||||||
|
"url": "http://www.thedailyshow.com/full-episodes/thu-december-13-2012-kristen-stewart",
|
||||||
|
"playlist": [
|
||||||
|
{
|
||||||
|
"file": "422204.mp4",
|
||||||
|
"md5": "7a7abe068b31ff03e7b8a37596e72380",
|
||||||
|
"info_dict": {
|
||||||
|
"title": "thedailyshow-thu-december-13-2012-kristen-stewart part 1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "422205.mp4",
|
||||||
|
"md5": "30552b7274c94dbb933f64600eadddd2",
|
||||||
|
"info_dict": {
|
||||||
|
"title": "thedailyshow-thu-december-13-2012-kristen-stewart part 2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "422206.mp4",
|
||||||
|
"md5": "1f4c0664b352cb8e8fe85d5da4fbee91",
|
||||||
|
"info_dict": {
|
||||||
|
"title": "thedailyshow-thu-december-13-2012-kristen-stewart part 3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "422207.mp4",
|
||||||
|
"md5": "f61ee8a4e6bd1308438e03badad78554",
|
||||||
|
"info_dict": {
|
||||||
|
"title": "thedailyshow-thu-december-13-2012-kristen-stewart part 4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -2333,7 +2333,6 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
(the-colbert-report-(videos|collections)/(?P<clipID>[0-9]+)/[^/]*/(?P<cntitle>.*?))
|
(the-colbert-report-(videos|collections)/(?P<clipID>[0-9]+)/[^/]*/(?P<cntitle>.*?))
|
||||||
|(watch/(?P<date>[^/]*)/(?P<tdstitle>.*)))))
|
|(watch/(?P<date>[^/]*)/(?P<tdstitle>.*)))))
|
||||||
$"""
|
$"""
|
||||||
IE_NAME = u'comedycentral'
|
|
||||||
|
|
||||||
_available_formats = ['3500', '2200', '1700', '1200', '750', '400']
|
_available_formats = ['3500', '2200', '1700', '1200', '750', '400']
|
||||||
|
|
||||||
|
@ -2446,7 +2445,7 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
|
|
||||||
idoc = xml.etree.ElementTree.fromstring(indexXml)
|
idoc = xml.etree.ElementTree.fromstring(indexXml)
|
||||||
itemEls = idoc.findall('.//item')
|
itemEls = idoc.findall('.//item')
|
||||||
for itemEl in itemEls:
|
for partNum,itemEl in enumerate(itemEls):
|
||||||
mediaId = itemEl.findall('./guid')[0].text
|
mediaId = itemEl.findall('./guid')[0].text
|
||||||
shortMediaId = mediaId.split(':')[-1]
|
shortMediaId = mediaId.split(':')[-1]
|
||||||
showId = mediaId.split(':')[-2].replace('.com', '')
|
showId = mediaId.split(':')[-2].replace('.com', '')
|
||||||
|
@ -2495,7 +2494,7 @@ class ComedyCentralIE(InfoExtractor):
|
||||||
base = 'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=1+_pxI0=Ripod-h264+_pxL0=undefined+_pxM0=+_pxK=18639+_pxE=mp4/44620/mtvnorigin/'
|
base = 'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=1+_pxI0=Ripod-h264+_pxL0=undefined+_pxM0=+_pxK=18639+_pxE=mp4/44620/mtvnorigin/'
|
||||||
video_url = base + m.group('finalid')
|
video_url = base + m.group('finalid')
|
||||||
|
|
||||||
effTitle = showId + u'-' + epTitle
|
effTitle = showId + u'-' + epTitle + u' part ' + compat_str(partNum+1)
|
||||||
info = {
|
info = {
|
||||||
'id': shortMediaId,
|
'id': shortMediaId,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
|
|
Loading…
Reference in a new issue