@ -4069,8 +4069,8 @@ class InaIE(InfoExtractor):
} ]
} ]
class HowcastIE ( InfoExtractor ) :
class HowcastIE ( InfoExtractor ) :
""" Information Extractor for Ina.fr """
""" Information Extractor for Howcast.com """
_VALID_URL = r ' (?:https?://)?(?:www \ .)?howcast \ .com/videos/(?P<id> [ \ d ] +)'
_VALID_URL = r ' (?:https?://)?(?:www \ .)?howcast \ .com/videos/(?P<id> \ d +)'
def _real_extract ( self , url ) :
def _real_extract ( self , url ) :
mobj = re . match ( self . _VALID_URL , url )
mobj = re . match ( self . _VALID_URL , url )
@ -4104,6 +4104,35 @@ class HowcastIE(InfoExtractor):
' description ' : video_description ,
' description ' : video_description ,
} ]
} ]
class VineIE ( InfoExtractor ) :
""" Information Extractor for Vine.co """
_VALID_URL = r ' (?:https?://)?(?:www \ .)?vine \ .co/v/(?P<id> \ w+) '
def _real_extract ( self , url ) :
mobj = re . match ( self . _VALID_URL , url )
video_id = mobj . group ( ' id ' )
webpage_url = ' https://vine.co/v/ ' + video_id
webpage = self . _download_webpage ( webpage_url , video_id )
mobj = re . search ( r ' <meta property= " twitter:player:stream " content= " ([^ " ]+) " ' , webpage )
if mobj is None :
raise ExtractorError ( u ' Unable to extract video URL ' )
video_url = mobj . group ( 1 )
mobj = re . search ( r ' <meta property= " og:title " content= " ([^ " ]+) " ' , webpage )
if mobj is None :
raise ExtractorError ( u ' Unable to extract title ' )
video_title = mobj . group ( 1 )
return [ {
' id ' : video_id ,
' url ' : video_url ,
' ext ' : ' mp4 ' ,
' title ' : video_title ,
} ]
def gen_extractors ( ) :
def gen_extractors ( ) :
""" Return a list of an instance of every supported extractor.
""" Return a list of an instance of every supported extractor.
The order does matter ; the first extractor matched is the one handling the URL .
The order does matter ; the first extractor matched is the one handling the URL .
@ -4162,6 +4191,7 @@ def gen_extractors():
RedTubeIE ( ) ,
RedTubeIE ( ) ,
InaIE ( ) ,
InaIE ( ) ,
HowcastIE ( ) ,
HowcastIE ( ) ,
VineIE ( ) ,
GenericIE ( )
GenericIE ( )
]
]