Added an IE for http://ringtv.craveonline.com/
This commit is contained in:
parent
cf857ae84a
commit
517ec10077
@ -39,6 +39,7 @@ from .photobucket import PhotobucketIE
|
|||||||
from .pornotube import PornotubeIE
|
from .pornotube import PornotubeIE
|
||||||
from .rbmaradio import RBMARadioIE
|
from .rbmaradio import RBMARadioIE
|
||||||
from .redtube import RedTubeIE
|
from .redtube import RedTubeIE
|
||||||
|
from .ringtv import RingTvIE
|
||||||
from .soundcloud import SoundcloudIE, SoundcloudSetIE
|
from .soundcloud import SoundcloudIE, SoundcloudSetIE
|
||||||
from .spiegel import SpiegelIE
|
from .spiegel import SpiegelIE
|
||||||
from .stanfordoc import StanfordOpenClassroomIE
|
from .stanfordoc import StanfordOpenClassroomIE
|
||||||
@ -142,6 +143,7 @@ def gen_extractors():
|
|||||||
HotNewHipHopIE(),
|
HotNewHipHopIE(),
|
||||||
AUEngineIE(),
|
AUEngineIE(),
|
||||||
GameSpotIE(),
|
GameSpotIE(),
|
||||||
|
RingTvIE(),
|
||||||
GenericIE()
|
GenericIE()
|
||||||
]
|
]
|
||||||
|
|
||||||
|
28
youtube_dl/extractor/ringtv.py
Normal file
28
youtube_dl/extractor/ringtv.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class RingTvIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'(?:http://)?(?:www\.)?ringtv\.craveonline\.com/videos/video/([^/]+)'
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
mobj = re.match(self._VALID_URL, url)
|
||||||
|
video_id = mobj.group(1).split('-')[0]
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
title = self._search_regex(r'<title>(.+?)</title>',
|
||||||
|
webpage, 'video title').replace(' | RingTV','')
|
||||||
|
description = self._search_regex(r'<div class="blurb">(.+?)</div>',
|
||||||
|
webpage, 'Description')
|
||||||
|
final_url = "http://ringtv.craveonline.springboardplatform.com/storage/ringtv.craveonline.com/conversion/%s.mp4" %(str(video_id))
|
||||||
|
thumbnail_url = "http://ringtv.craveonline.springboardplatform.com/storage/ringtv.craveonline.com/snapshots/%s.jpg" %(str(video_id))
|
||||||
|
ext = final_url.split('.')[-1]
|
||||||
|
return [{
|
||||||
|
'id' : video_id,
|
||||||
|
'url' : final_url,
|
||||||
|
'ext' : ext,
|
||||||
|
'title' : title,
|
||||||
|
'thumbnail' : thumbnail_url,
|
||||||
|
'description' : description,
|
||||||
|
}]
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user