diff options
Diffstat (limited to 'yt_dlp/extractor/piapro.py')
-rw-r--r-- | yt_dlp/extractor/piapro.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/yt_dlp/extractor/piapro.py b/yt_dlp/extractor/piapro.py index 87d912d..72e3748 100644 --- a/yt_dlp/extractor/piapro.py +++ b/yt_dlp/extractor/piapro.py @@ -1,5 +1,6 @@ +import urllib.parse + from .common import InfoExtractor -from ..compat import compat_urlparse from ..utils import ( ExtractorError, clean_html, @@ -30,7 +31,7 @@ class PiaproIE(InfoExtractor): 'thumbnail': r're:^https?://.*\.(?:png|jpg)$', 'upload_date': '20090901', 'view_count': int, - } + }, }, { 'note': 'There are break lines in description, mandating (?s) flag', 'url': 'https://piapro.jp/t/9cSd', @@ -47,13 +48,13 @@ class PiaproIE(InfoExtractor): 'view_count': int, 'thumbnail': r're:^https?://.*\.(?:png|jpg)$', 'uploader_id': 'cyankino', - } + }, }, { 'url': 'https://piapro.jp/content/hcw0z3a169wtemz6', - 'only_matching': True + 'only_matching': True, }, { 'url': 'https://piapro.jp/t/-SO-', - 'only_matching': True + 'only_matching': True, }] _login_status = False @@ -64,7 +65,7 @@ class PiaproIE(InfoExtractor): '_username': username, '_password': password, '_remember_me': 'on', - 'login': 'ログイン' + 'login': 'ログイン', } self._request_webpage('https://piapro.jp/login/', None) urlh = self._request_webpage( @@ -74,7 +75,7 @@ class PiaproIE(InfoExtractor): if urlh is False: login_ok = False else: - parts = compat_urlparse.urlparse(urlh.url) + parts = urllib.parse.urlparse(urlh.url) if parts.path != '/': login_ok = False if not login_ok: |