mirror of https://github.com/yt-dlp/yt-dlp.git
Compare commits
5 Commits
3011554282
...
810cf55549
Author | SHA1 | Date |
---|---|---|
Mozi | 810cf55549 | |
bashonly | 1a366403d9 | |
Simon Sawicki | 7e26bd53f9 | |
Mozi | 569d25e0fa | |
Mozi | 696ac32838 |
|
@ -300,7 +300,7 @@ jobs:
|
|||
macos_legacy:
|
||||
needs: process
|
||||
if: inputs.macos_legacy
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
@ -2090,10 +2090,7 @@ Line 1
|
|||
|
||||
args = [sys.executable, '-c', 'import sys; print(end=sys.argv[1])', argument, 'end']
|
||||
assert run_shell(args) == expected
|
||||
|
||||
escaped = shell_quote(argument, shell=True)
|
||||
args = f'{sys.executable} -c "import sys; print(end=sys.argv[1])" {escaped} end'
|
||||
assert run_shell(args) == expected
|
||||
assert run_shell(shell_quote(args, shell=True)) == expected
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -27,8 +27,18 @@ class BrilliantpalaBaseIE(InfoExtractor):
|
|||
r'"username"\s*:\s*"(?P<username>[^"]+)"', webpage, 'logged-in username')
|
||||
|
||||
def _perform_login(self, username, password):
|
||||
login_form = self._hidden_inputs(self._download_webpage(
|
||||
self._LOGIN_API, None, 'Downloading login page'))
|
||||
login_page, urlh = self._download_webpage_handle(
|
||||
self._LOGIN_API, None, 'Downloading login page', expected_status=401)
|
||||
if not (urlh.status == 401 or urlh.url.startswith(self._LOGIN_API)):
|
||||
self.write_debug('Cookies are valid, no login required.')
|
||||
return
|
||||
|
||||
if urlh.status == 401:
|
||||
# The stored cookies have been invalidated.
|
||||
# No login page will be returned and cookies will be reset, so visit the page again.
|
||||
login_page = self._download_webpage(self._LOGIN_API, None, 'Downloading login page')
|
||||
|
||||
login_form = self._hidden_inputs(login_page)
|
||||
login_form.update({
|
||||
'username': username,
|
||||
'password': password,
|
||||
|
|
Loading…
Reference in New Issue