mirror of https://github.com/blackjack4494/yt-dlc
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
11 years ago
|
from __future__ import unicode_literals
|
||
|
|
||
12 years ago
|
from .common import InfoExtractor
|
||
10 years ago
|
from ..compat import compat_urllib_parse_unquote
|
||
12 years ago
|
|
||
|
|
||
|
class Ro220IE(InfoExtractor):
|
||
|
IE_NAME = '220.ro'
|
||
10 years ago
|
_VALID_URL = r'(?x)(?:https?://)?(?:www\.)?220\.ro/(?P<category>[^/]+)/(?P<shorttitle>[^/]+)/(?P<id>[^/]+)'
|
||
12 years ago
|
_TEST = {
|
||
10 years ago
|
'url': 'http://www.220.ro/sport/Luati-Le-Banii-Sez-4-Ep-1/LYV6doKo7f/',
|
||
11 years ago
|
'md5': '03af18b73a07b4088753930db7a34add',
|
||
|
'info_dict': {
|
||
10 years ago
|
'id': 'LYV6doKo7f',
|
||
|
'ext': 'mp4',
|
||
|
'title': 'Luati-le Banii sez 4 ep 1',
|
||
8 years ago
|
'description': r're:^Iata-ne reveniti dupa o binemeritata vacanta\. +Va astept si pe Facebook cu pareri si comentarii.$',
|
||
12 years ago
|
}
|
||
|
}
|
||
|
|
||
|
def _real_extract(self, url):
|
||
10 years ago
|
video_id = self._match_id(url)
|
||
12 years ago
|
|
||
|
webpage = self._download_webpage(url, video_id)
|
||
10 years ago
|
url = compat_urllib_parse_unquote(self._search_regex(
|
||
|
r'(?s)clip\s*:\s*{.*?url\s*:\s*\'([^\']+)\'', webpage, 'url'))
|
||
|
title = self._og_search_title(webpage)
|
||
|
description = self._og_search_description(webpage)
|
||
|
thumbnail = self._og_search_thumbnail(webpage)
|
||
|
|
||
|
formats = [{
|
||
|
'format_id': 'sd',
|
||
|
'url': url,
|
||
|
'ext': 'mp4',
|
||
|
}]
|
||
12 years ago
|
|
||
11 years ago
|
return {
|
||
12 years ago
|
'id': video_id,
|
||
10 years ago
|
'formats': formats,
|
||
|
'title': title,
|
||
|
'description': description,
|
||
|
'thumbnail': thumbnail,
|
||
12 years ago
|
}
|