[udemy,xiami,yandexmusic] Override _download_webpage_handle instead of _download_webpage
authorSergey M․ <dstftw@gmail.com>
Sun, 29 Apr 2018 15:49:47 +0000 (22:49 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 29 Apr 2018 15:54:52 +0000 (22:54 +0700)
youtube_dl/extractor/udemy.py
youtube_dl/extractor/xiami.py
youtube_dl/extractor/yandexmusic.py

index 6d6c0a98fa64e9e2afc68ce2ad569f5a91d5c24b..439ed2a890f533f264219b1c3d2bf2efa83f57cc 100644 (file)
@@ -115,9 +115,9 @@ class UdemyIE(InfoExtractor):
                 error_str += ' - %s' % error_data.get('formErrors')
             raise ExtractorError(error_str, expected=True)
 
-    def _download_webpage(self, *args, **kwargs):
+    def _download_webpage_handle(self, *args, **kwargs):
         kwargs.setdefault('headers', {})['User-Agent'] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4'
-        return super(UdemyIE, self)._download_webpage(
+        return super(UdemyIE, self)._download_webpage_handle(
             *args, **compat_kwargs(kwargs))
 
     def _download_json(self, url_or_request, *args, **kwargs):
index 7f871c8ec7c65b8e969517165126824342dbf2e4..8333fb5349980b964d31256d98f0ef7fb576d738 100644 (file)
@@ -9,8 +9,8 @@ from ..utils import int_or_none
 class XiamiBaseIE(InfoExtractor):
     _API_BASE_URL = 'http://www.xiami.com/song/playlist/cat/json/id'
 
-    def _download_webpage(self, *args, **kwargs):
-        webpage = super(XiamiBaseIE, self)._download_webpage(*args, **kwargs)
+    def _download_webpage_handle(self, *args, **kwargs):
+        webpage = super(XiamiBaseIE, self)._download_webpage_handle(*args, **kwargs)
         if '>Xiami is currently not available in your country.<' in webpage:
             self.raise_geo_restricted('Xiami is currently not available in your country')
         return webpage
index eb1062142ecbc6a4702f0dc7763c414934fd3645..e85eca073eb48bed8e0ea7198a3e8f1580646df7 100644 (file)
@@ -34,8 +34,8 @@ class YandexMusicBaseIE(InfoExtractor):
             'youtube-dl with --cookies',
             expected=True)
 
-    def _download_webpage(self, *args, **kwargs):
-        webpage = super(YandexMusicBaseIE, self)._download_webpage(*args, **kwargs)
+    def _download_webpage_handle(self, *args, **kwargs):
+        webpage = super(YandexMusicBaseIE, self)._download_webpage_handle(*args, **kwargs)
         if 'Нам очень жаль, но&nbsp;запросы, поступившие с&nbsp;вашего IP-адреса, похожи на&nbsp;автоматические.' in webpage:
             self._raise_captcha()
         return webpage