Cominsoon_it Add new extractor
This commit is contained in:
parent
fee70322d7
commit
c3b02b405b
39
youtube_dl/extractor/comingsoon_it.py
Normal file
39
youtube_dl/extractor/comingsoon_it.py
Normal file
@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
||||
class ComingSoonITIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?comingsoon\.it/film/.*\b/video/\?.*\bvid=(?P<id>\w+)'
|
||||
_TEST = {
|
||||
'url': 'http://www.comingsoon.it/film/1981-indagine-a-new-york/50825/video/?vid=16392',
|
||||
'md5': '347808c99cce66b7b3654f7b694f6dfa',
|
||||
'info_dict': {
|
||||
'id': '16392',
|
||||
'ext': 'mp4',
|
||||
'title': '1981: Indagine a New York, Trailer del film, versione originale - Film (2014)',
|
||||
'url': 'http://video.comingsoon.it/MP4/16392.mp4',
|
||||
'description': 'Trailer del film, versione originale - 1981: Indagine a New York'
|
||||
}
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
title = self._og_search_title(webpage)
|
||||
description = self._og_search_description(webpage)
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
'description': description,
|
||||
|
||||
'formats': [{
|
||||
'url': 'http://video.comingsoon.it/MP4/' + video_id + '.mp4',
|
||||
'format': 'Standard Definition'
|
||||
},{
|
||||
'url': 'http://video.comingsoon.it/MP4/' + video_id + '.mp4',
|
||||
'format': 'High Definition'}],
|
||||
'ext': 'mp4'
|
||||
}
|
@ -155,6 +155,7 @@ from .coub import CoubIE
|
||||
from .collegerama import CollegeRamaIE
|
||||
from .comedycentral import ComedyCentralIE, ComedyCentralShowsIE
|
||||
from .comcarcoff import ComCarCoffIE
|
||||
from .comingsoon_it import ComingSoonITIE
|
||||
from .commonmistakes import CommonMistakesIE, UnicodeBOMIE
|
||||
from .commonprotocols import RtmpIE
|
||||
from .condenast import CondeNastIE
|
||||
|
Loading…
x
Reference in New Issue
Block a user