X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fro220.py;h=69934ef2b042903afeb4ca6bada108ec39caf2d1;hb=HEAD;hp=4678f62dfadba9968ff363a919471c869eb35c71;hpb=ff6b7b049b14a061a362e701df8ab4b2f7b82456;p=youtube-dl diff --git a/youtube_dl/extractor/ro220.py b/youtube_dl/extractor/ro220.py index 4678f62df..69934ef2b 100644 --- a/youtube_dl/extractor/ro220.py +++ b/youtube_dl/extractor/ro220.py @@ -1,43 +1,43 @@ from __future__ import unicode_literals -import re - from .common import InfoExtractor -from ..utils import ( - clean_html, - compat_parse_qs, -) +from ..compat import compat_urllib_parse_unquote class Ro220IE(InfoExtractor): IE_NAME = '220.ro' - _VALID_URL = r'(?x)(?:https?://)?(?:www\.)?220\.ro/(?P[^/]+)/(?P[^/]+)/(?P[^/]+)' + _VALID_URL = r'(?x)(?:https?://)?(?:www\.)?220\.ro/(?P[^/]+)/(?P[^/]+)/(?P[^/]+)' _TEST = { - "url": "http://www.220.ro/sport/Luati-Le-Banii-Sez-4-Ep-1/LYV6doKo7f/", - 'file': 'LYV6doKo7f.mp4', + 'url': 'http://www.220.ro/sport/Luati-Le-Banii-Sez-4-Ep-1/LYV6doKo7f/', 'md5': '03af18b73a07b4088753930db7a34add', 'info_dict': { - "title": "Luati-le Banii sez 4 ep 1", - "description": "Iata-ne reveniti dupa o binemeritata vacanta. Va astept si pe Facebook cu pareri si comentarii.", + 'id': 'LYV6doKo7f', + 'ext': 'mp4', + 'title': 'Luati-le Banii sez 4 ep 1', + 'description': r're:^Iata-ne reveniti dupa o binemeritata vacanta\. +Va astept si pe Facebook cu pareri si comentarii.$', } } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('video_id') + video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - flashVars_str = self._search_regex( - r'