mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-22 07:58:54 +00:00
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com> Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user