1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00
Commit Graph

30 Commits

Author SHA1 Message Date
Mike Fährmann
cf0817e17b
[cookies] try decryption with empty password as fallback
https://github.com/yt-dlp/yt-dlp/pull/6897
2024-11-05 08:34:24 +01:00
Mike Fährmann
d2db7060e2
[cookies] support chromium table version 24 (#6162)
https://github.com/yt-dlp/yt-dlp/pull/11425
2024-11-04 19:12:50 +01:00
Mike Fährmann
67547a659f
[cookies] convert Chromium expires_utc values to Unix timestamps 2024-10-15 08:31:46 +02:00
Mike Fährmann
36883e458e
use 'v[0] == "c"' instead of 'v.startswith("c")' 2024-10-15 08:24:06 +02:00
Mike Fährmann
d68bb78f44
use 'True if COND else False' for bool conversions
faster than 'bool(COND)', especially on older Pythons < 3.11
2024-10-14 20:57:47 +02:00
Mike Fährmann
3946fe5ac4
[cookies] return loaded cookies as list
don't set_cookie() them immediately into a CookieJar
also, give some more consistent names to chrome/chromium functions
2024-10-14 14:24:27 +02:00
Mike Fährmann
1df09292b5
consistent __exit__() argument names 2024-10-11 16:43:28 +02:00
Mike Fährmann
73f833d08a
[cookies:firefox] support using domain + container filters together 2024-09-16 14:58:44 +02:00
Mike Fährmann
2d55521582
[cookies:firefox] extract only cookies without container by default (#5957)
add support for 'all' to extract all cookies regardless of container
2024-08-14 18:59:41 +02:00
joskezelensky
b2a40a5b93
add thorium cookies support
- Update cookies.py
- preserve lexicographical order
2024-06-27 17:56:53 +02:00
Mike Fährmann
9c65db2a92
consistent 'with open(…) as fp:' syntax 2024-06-14 01:22:00 +02:00
Mike Fährmann
90b3741643
[cookies] set proper 'expires' value for Chrome session cookies
https://github.com/yt-dlp/yt-dlp/pull/9747
2024-05-11 19:46:35 +02:00
Jan Wikholm
06d102f19a
optimize _find_most_recently_used_file for exact profile
When reading cookies from the browser, the user is able to give either just the browser name, or also provide profile/container information.

If an exact profile is provided, there is no need to find the latest profile with `os.walk` which is very expensive.

This change optimizes that case and the performance increase is significant (~8 sec to 0.6 sec).

```
$ time gallery-dl --config-ignore -d . -D . --cookies-from-browser FIREFOX https://imgur.com/OO4UNqJ
[cookies][info] Extracted 16 cookies from Firefox
 ./imgur_OO4UNqJ.jpg

real    0m8.429s
user    0m0.216s
sys     0m0.431s

$ time gallery-dl --config-ignore -d . -D . --cookies-from-browser FIREFOX:bgamf5r6.default-release https://imgur.com/OO4UNqJ
[cookies][info] Extracted 16 cookies from Firefox
 ./imgur_OO4UNqJ.jpg

real    0m0.456s
user    0m0.183s
sys     0m0.011s

$ gallery-dl --version
1.26.9
```
2024-05-02 18:16:13 +02:00
Mike Fährmann
40bd145637
remove 'contextlib' imports 2024-04-06 16:59:09 +02:00
Mike Fährmann
9a8403917a
restore LD_LIBRARY_PATH for PyInstaller builds (#5421) 2024-04-06 16:58:33 +02:00
Mike Fährmann
00570028a3
[cookies] fix macOS Firefox profile path
85b33f5c16
2024-01-03 01:25:50 +01:00
Mike Fährmann
de224ef3e4
[cookies] include exception in fallback warning 2023-10-21 13:23:45 +02:00
Mike Fährmann
d194ea68a9
[cookies] open cookie databases in read-only mode
bypasses the need to copy the entire database file
might solve #4195
2023-10-12 21:16:42 +02:00
Mike Fährmann
2e6cea95db
[cookies] update logging behavior (#4050)
- only show the same warning/error once
- simplify and capitalize logging messages
2023-05-12 16:34:17 +02:00
Mike Fährmann
4c1f3b2160
[cookies] simplify '_mac_absolute_time_to_posix()'
hardcode UNIX timestamp of 2001-01-01
2023-05-06 15:10:13 +02:00
Mike Fährmann
a14b63d941
support selecting a domain for '--cookies-from-browser'
for example 'gallery-dl --cookies-from-browser firefox/twitter.com'
2023-05-06 15:09:49 +02:00
Mike Fährmann
076380e079
remove '*' indicating keyword-only arguments
they are kind of unnecessary and
cause a non-insignificant function call overhead (~10%)
2023-05-02 22:23:33 +02:00
Mike Fährmann
1aae72773f
put argument init on separate lines 2023-02-10 17:05:20 +01:00
Mike Fährmann
dd884b02ee
replace json.loads with direct calls to JSONDecoder.decode 2023-02-09 15:22:00 +01:00
Mike Fährmann
3f29b8fe91
[cookies] convert browser names to lowercase 2023-01-03 14:58:48 +01:00
Mike Fährmann
dfe7b23579
support Firefox containers for --cookies-from-browser (#3346) 2022-12-09 19:43:55 +01:00
Mike Fährmann
4c6379e9d5
fix typo 2022-11-18 13:14:11 +01:00
Mike Fährmann
34c428abf1
support cygwin/BSD/etc for --cookies-from-browser
https://github.com/yt-dlp/yt-dlp/pull/3975
2022-06-11 15:30:11 +02:00
Mike Fährmann
aa2db7abeb
[cookies] cleanup (#1606)
- fix Popen.communicate() calls
- move and simplify _process_chrome_cookie() code
- remove random print() statement and config dict
2022-05-08 13:28:53 +02:00
Mike Fährmann
6742f3bc1e
implement --cookies-from-browser (#1606)
most of the code is adapted from yt-dlp's implementation
and *should* work the same.
2022-05-07 23:06:37 +02:00