mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 14:14:54 +01:00
Remove sensitive data from logging in messages
This commit is contained in:
parent
79d1f8ed68
commit
e4d9586562
|
@ -78,7 +78,7 @@ def _login(self):
|
||||||
post_url = urljoin(self._LOGIN_URL, post_url)
|
post_url = urljoin(self._LOGIN_URL, post_url)
|
||||||
|
|
||||||
response = self._download_webpage(
|
response = self._download_webpage(
|
||||||
post_url, None, 'Logging in as %s' % username,
|
post_url, None, 'Logging in',
|
||||||
data=urlencode_postdata(login_form), headers={
|
data=urlencode_postdata(login_form), headers={
|
||||||
'Referer': self._LOGIN_URL,
|
'Referer': self._LOGIN_URL,
|
||||||
})
|
})
|
||||||
|
|
|
@ -87,7 +87,7 @@ def _login(self):
|
||||||
self._LOGIN_URL, urlencode_postdata(login_form))
|
self._LOGIN_URL, urlencode_postdata(login_form))
|
||||||
request.add_header('Content-Type', 'application/x-www-form-urlencoded')
|
request.add_header('Content-Type', 'application/x-www-form-urlencoded')
|
||||||
response = self._download_webpage(
|
response = self._download_webpage(
|
||||||
request, None, 'Logging in as %s' % username)
|
request, None, 'Logging in')
|
||||||
|
|
||||||
error = self._html_search_regex(
|
error = self._html_search_regex(
|
||||||
r'(?s)<ul[^>]+class="[^"]*\blist_error\b[^"]*">(.+?)</ul>',
|
r'(?s)<ul[^>]+class="[^"]*\blist_error\b[^"]*">(.+?)</ul>',
|
||||||
|
|
|
@ -59,7 +59,7 @@ def _login(self):
|
||||||
self._LOGIN_URL, urlencode_postdata(login_form))
|
self._LOGIN_URL, urlencode_postdata(login_form))
|
||||||
request.add_header('Referer', self._LOGIN_URL)
|
request.add_header('Referer', self._LOGIN_URL)
|
||||||
response = self._download_webpage(
|
response = self._download_webpage(
|
||||||
request, None, 'Logging in as %s' % username)
|
request, None, 'Logging in')
|
||||||
|
|
||||||
login_error = self._html_search_regex(
|
login_error = self._html_search_regex(
|
||||||
r'(?s)<div class="messages error">(.+?)</div>',
|
r'(?s)<div class="messages error">(.+?)</div>',
|
||||||
|
|
|
@ -54,7 +54,7 @@ def _login(self):
|
||||||
request = sanitized_Request(
|
request = sanitized_Request(
|
||||||
self._LOGIN_URL, urlencode_postdata(login_form))
|
self._LOGIN_URL, urlencode_postdata(login_form))
|
||||||
response = self._download_webpage(
|
response = self._download_webpage(
|
||||||
request, None, 'Logging in as %s' % username)
|
request, None, 'Logging in')
|
||||||
|
|
||||||
if all(logout_pattern not in response
|
if all(logout_pattern not in response
|
||||||
for logout_pattern in ['href="/accounts/logout/"', '>Log out<']):
|
for logout_pattern in ['href="/accounts/logout/"', '>Log out<']):
|
||||||
|
|
|
@ -57,7 +57,7 @@ def _login(self):
|
||||||
try:
|
try:
|
||||||
data = self._download_json(
|
data = self._download_json(
|
||||||
'https://prod-api-funimationnow.dadcdigital.com/api/auth/login/',
|
'https://prod-api-funimationnow.dadcdigital.com/api/auth/login/',
|
||||||
None, 'Logging in as %s' % username, data=urlencode_postdata({
|
None, 'Logging in', data=urlencode_postdata({
|
||||||
'username': username,
|
'username': username,
|
||||||
'password': password,
|
'password': password,
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -70,7 +70,7 @@ def _login(self):
|
||||||
return
|
return
|
||||||
|
|
||||||
login = self._download_json(
|
login = self._download_json(
|
||||||
self._LOGIN_URL, None, 'Logging in as %s' % username,
|
self._LOGIN_URL, None, 'Logging in',
|
||||||
data=urlencode_postdata({
|
data=urlencode_postdata({
|
||||||
'a': 'login',
|
'a': 'login',
|
||||||
'cookie': '1',
|
'cookie': '1',
|
||||||
|
|
|
@ -67,7 +67,7 @@ def _login(self):
|
||||||
'https://www.patreon.com/processLogin',
|
'https://www.patreon.com/processLogin',
|
||||||
compat_urllib_parse_urlencode(login_form).encode('utf-8')
|
compat_urllib_parse_urlencode(login_form).encode('utf-8')
|
||||||
)
|
)
|
||||||
login_page = self._download_webpage(request, None, note='Logging in as %s' % username)
|
login_page = self._download_webpage(request, None, note='Logging in')
|
||||||
|
|
||||||
if re.search(r'onLoginFailed', login_page):
|
if re.search(r'onLoginFailed', login_page):
|
||||||
raise ExtractorError('Unable to login, incorrect username and/or password', expected=True)
|
raise ExtractorError('Unable to login, incorrect username and/or password', expected=True)
|
||||||
|
|
|
@ -116,7 +116,7 @@ def _login(self):
|
||||||
post_url = compat_urlparse.urljoin(self._LOGIN_URL, post_url)
|
post_url = compat_urlparse.urljoin(self._LOGIN_URL, post_url)
|
||||||
|
|
||||||
response = self._download_webpage(
|
response = self._download_webpage(
|
||||||
post_url, None, 'Logging in as %s' % username,
|
post_url, None, 'Logging in',
|
||||||
data=urlencode_postdata(login_form),
|
data=urlencode_postdata(login_form),
|
||||||
headers={'Content-Type': 'application/x-www-form-urlencoded'})
|
headers={'Content-Type': 'application/x-www-form-urlencoded'})
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ def _login(self):
|
||||||
|
|
||||||
login_request = self._download_webpage(
|
login_request = self._download_webpage(
|
||||||
self._LOGIN_URL, None,
|
self._LOGIN_URL, None,
|
||||||
note='Logging in as %s' % username,
|
note='Logging in',
|
||||||
data=urlencode_postdata(login_form),
|
data=urlencode_postdata(login_form),
|
||||||
headers={
|
headers={
|
||||||
'Referer': self._LOGIN_URL,
|
'Referer': self._LOGIN_URL,
|
||||||
|
|
|
@ -61,7 +61,7 @@ def is_logged(webpage):
|
||||||
request = sanitized_Request(
|
request = sanitized_Request(
|
||||||
self._LOGIN_URL, urlencode_postdata(login_form), headers=headers)
|
self._LOGIN_URL, urlencode_postdata(login_form), headers=headers)
|
||||||
login_page = self._download_webpage(
|
login_page = self._download_webpage(
|
||||||
request, None, 'Logging in as %s' % username)
|
request, None, 'Logging in')
|
||||||
|
|
||||||
if not is_logged(login_page):
|
if not is_logged(login_page):
|
||||||
raise ExtractorError(
|
raise ExtractorError(
|
||||||
|
|
|
@ -101,7 +101,7 @@ def login_step(page, urlh, note, data):
|
||||||
fail(clean_html(login_page))
|
fail(clean_html(login_page))
|
||||||
|
|
||||||
redirect_page, handle = login_step(
|
redirect_page, handle = login_step(
|
||||||
login_page, handle, 'Logging in as %s' % username, {
|
login_page, handle, 'Logging in', {
|
||||||
'username': username,
|
'username': username,
|
||||||
'password': password,
|
'password': password,
|
||||||
})
|
})
|
||||||
|
|
|
@ -164,7 +164,7 @@ def is_logged(webpage):
|
||||||
})
|
})
|
||||||
|
|
||||||
response = self._download_webpage(
|
response = self._download_webpage(
|
||||||
self._LOGIN_URL, None, 'Logging in as %s' % username,
|
self._LOGIN_URL, None, 'Logging in',
|
||||||
data=urlencode_postdata(login_form),
|
data=urlencode_postdata(login_form),
|
||||||
headers={
|
headers={
|
||||||
'Referer': self._ORIGIN_URL,
|
'Referer': self._ORIGIN_URL,
|
||||||
|
|
|
@ -99,7 +99,7 @@ def _login(self):
|
||||||
|
|
||||||
login = self._call_api(
|
login = self._call_api(
|
||||||
'sessions.json', None,
|
'sessions.json', None,
|
||||||
'Logging in as %s' % username, post_data=login_form)
|
'Logging in', post_data=login_form)
|
||||||
|
|
||||||
self._token = login.get('token')
|
self._token = login.get('token')
|
||||||
if not self._token:
|
if not self._token:
|
||||||
|
|
|
@ -67,7 +67,7 @@ def _login(self):
|
||||||
|
|
||||||
login_page = self._download_webpage(
|
login_page = self._download_webpage(
|
||||||
'https://login.vk.com/?act=login', None,
|
'https://login.vk.com/?act=login', None,
|
||||||
note='Logging in as %s' % username,
|
note='Logging in',
|
||||||
data=urlencode_postdata(login_form))
|
data=urlencode_postdata(login_form))
|
||||||
|
|
||||||
if re.search(r'onLoginFailed', login_page):
|
if re.search(r'onLoginFailed', login_page):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user