X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/415fdb62500dca2e22067a05008dfbf87c75b662..555f0744b172953b2591db57ff5c6bccb4f378d6:/youtube_dl/extractor/myvideo.py diff --git a/youtube_dl/extractor/myvideo.py b/youtube_dl/extractor/myvideo.py index ccb5959..5e754fc 100644 --- a/youtube_dl/extractor/myvideo.py +++ b/youtube_dl/extractor/myvideo.py @@ -7,11 +7,12 @@ import re import json from .common import InfoExtractor -from ..utils import ( +from ..compat import ( compat_ord, compat_urllib_parse, compat_urllib_request, - +) +from ..utils import ( ExtractorError, ) @@ -32,7 +33,7 @@ class MyVideoIE(InfoExtractor): # Original Code from: https://github.com/dersphere/plugin.video.myvideo_de.git # Released into the Public Domain by Tristan Fischer on 2013-05-19 # https://github.com/rg3/youtube-dl/pull/842 - def __rc4crypt(self,data, key): + def __rc4crypt(self, data, key): x = 0 box = list(range(256)) for i in list(range(256)): @@ -48,17 +49,17 @@ class MyVideoIE(InfoExtractor): out += chr(compat_ord(char) ^ box[(box[x] + box[y]) % 256]) return out - def __md5(self,s): + def __md5(self, s): return hashlib.md5(s).hexdigest().encode() - def _real_extract(self,url): + def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') GK = ( - b'WXpnME1EZGhNRGhpTTJNM01XVmhOREU0WldNNVpHTTJOakpt' - b'TW1FMU5tVTBNR05pWkRaa05XRXhNVFJoWVRVd1ptSXhaVEV3' - b'TnpsbA0KTVRkbU1tSTRNdz09' + b'WXpnME1EZGhNRGhpTTJNM01XVmhOREU0WldNNVpHTTJOakpt' + b'TW1FMU5tVTBNR05pWkRaa05XRXhNVFJoWVRVd1ptSXhaVEV3' + b'TnpsbA0KTVRkbU1tSTRNdz09' ) # Get video webpage @@ -71,7 +72,7 @@ class MyVideoIE(InfoExtractor): video_url = mobj.group(1) + '.flv' video_title = self._html_search_regex('