X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/c512650955de0b16d37e7fa7fb29ea0985e415bb..d018d3313032e12968a6add6800e51d412e2f602:/youtube_dl/extractor/mooshare.py diff --git a/youtube_dl/extractor/mooshare.py b/youtube_dl/extractor/mooshare.py index 7d21ea1..7cc7f05 100644 --- a/youtube_dl/extractor/mooshare.py +++ b/youtube_dl/extractor/mooshare.py @@ -1,13 +1,12 @@ from __future__ import unicode_literals import re -import time from .common import InfoExtractor +from ..compat import compat_urllib_parse from ..utils import ( ExtractorError, - compat_urllib_request, - compat_urllib_parse, + sanitized_Request, ) @@ -43,13 +42,11 @@ class MooshareIE(InfoExtractor): ] def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') - + video_id = self._match_id(url) page = self._download_webpage(url, video_id, 'Downloading page') if re.search(r'>Video Not Found or Deleted<', page) is not None: - raise ExtractorError(u'Video %s does not exist' % video_id, expected=True) + raise ExtractorError('Video %s does not exist' % video_id, expected=True) hash_key = self._html_search_regex(r'', page, 'hash') title = self._html_search_regex(r'(?m)