Compare commits

...

8 Commits

Author SHA1 Message Date
Stefan Lobbenmeier 022eebc547
Merge 67a75dc15c into 1a366403d9 2024-04-28 19:37:08 +02:00
bashonly 1a366403d9
[build] Run `macos_legacy` job on `macos-12` (#9804)
`macos-latest` has been bumped to `macos-14-arm64` which breaks the builds

Authored by: bashonly
2024-04-28 15:35:17 +00:00
Simon Sawicki 7e26bd53f9
[core/windows] Fix tests for `sys.executable` with spaces (Fix for 64766459e3)
Authored by: Grub4K
2024-04-28 15:47:55 +02:00
Stefan Lobbenmeier 67a75dc15c has_expires is now no longer needed 2024-04-20 19:37:56 +02:00
Stefan Lobbenmeier dc70bae66a
Check expires_utc for 0 instead, works just the same
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
2024-04-20 19:37:13 +02:00
Stefan Lobbenmeier a17527c6fa Add comment explaining why we set expires_utc to None 2024-04-20 18:55:28 +02:00
Stefan Lobbenmeier bf4ac4df74
Update yt_dlp/cookies.py
Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
2024-04-20 18:52:23 +02:00
Stefan Lobbenmeier 4f3ad96f2c Enable use of session cookies in chrome
Fixes #5534
2024-04-20 15:31:18 +02:00
3 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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__':

View File

@ -347,6 +347,11 @@ def _process_chrome_cookie(decryptor, host_key, name, value, encrypted_value, pa
if value is None:
return is_encrypted, None
# In chrome, session cookies have expires_utc set to 0
# In our cookie-store, cookies that do not expire should have expires set to None
if not expires_utc:
expires_utc = None
return is_encrypted, http.cookiejar.Cookie(
version=0, name=name, value=value, port=None, port_specified=False,
domain=host_key, domain_specified=bool(host_key), domain_initial_dot=host_key.startswith('.'),