mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-13 15:03:17 +08:00
Add files via upload
This commit is contained in:
parent
209c18d4d1
commit
4800834ce2
44
vidello.py
Normal file
44
vidello.py
Normal file
@ -0,0 +1,44 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
from ..utils import (
|
||||
clean_html
|
||||
)
|
||||
|
||||
|
||||
class VidelloIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?embed.vidello\.com/[0-9]/(?P<id>[a-zA-Z0-9]+)/player.html'
|
||||
_TEST = {
|
||||
'url': 'https://embed.vidello.com/2/t1umm637xb1ylgw4/player.html',
|
||||
'md5': '7a4d76ac74ef7724af4c6c3ecb5e0042',
|
||||
'info_dict': {
|
||||
'id': 't1umm637xb1ylgw4',
|
||||
'ext': 'mp4',
|
||||
'title': 'Vidello Hosting & Marketing',
|
||||
'description': "Start marketing your videos more effectively on \x03the web utilising vidello's premium hosting, streaming, \x03analytics & marketing features to grow your \x03online business fast."
|
||||
}
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
vidello_settings = self._parse_json(self._search_regex(
|
||||
r'vidello_' + video_id + '_settings\s*=\s*({.+});', webpage, 'vidello settings'), video_id)
|
||||
|
||||
video_url = ""
|
||||
video_sources = vidello_settings.get('player').get('clip').get('sources') or {}
|
||||
for curr_entry in video_sources:
|
||||
if curr_entry['type'] == "video/mp4":
|
||||
video_url = "http://" + curr_entry["src"][2:]
|
||||
title = vidello_settings.get('cta')[0].get('values').get('product_title')
|
||||
description = clean_html(vidello_settings.get('cta')[0].get('values').get('product_desc'))
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
'description': description,
|
||||
'url': video_url
|
||||
}
|
Loading…
Reference in New Issue
Block a user