aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Bugfix for 591bb9d3553a4d7b453777c1e28e0948741e3b50pukkandan2022-05-171-4/+7
| | | | Closes #3769
* Fix color in `-q -F`pukkandan2022-05-171-2/+14
| | | | | | and convert `ydl._out_files`/`ydl._allow_colors` to `Namespace` Closes #3761
* [cleanup] Misc cleanuppukkandan2022-05-171-36/+30
|
* [extractor] Use classmethod/property where possiblepukkandan2022-05-131-0/+1
| | | | | | and refactor lazy extractors accordingly. This reduces the need to create extractor instances
* Fix `--date today`pukkandan2022-05-111-17/+15
| | | | Closes #3704
* [cookies] Allow `cookiefile` to be a text streampukkandan2022-05-111-2/+22
| | | | Closes #3674
* Bugfix for 59f943cd5097e9bdbc3cb3e6b5675e43d369341apukkandan2022-05-101-2/+1
| | | | Fixes: https://github.com/yt-dlp/yt-dlp/commit/59f943cd5097e9bdbc3cb3e6b5675e43d369341a#commitcomment-73251597
* [cleanup] Minor fixes (See desc)pukkandan2022-05-091-44/+43
| | | | | | | | | | * [youtube] Fix `--youtube-skip-dash-manifest` * [build] Use `$()` in `Makefile`. Closes #3684 * Fix bug in 385ffb467b2285e85a2a5495b90314ba1f8e0700 * Fix bug in 43d7f5a5d0c77556156a3f8caa6976d3908a1e38 * [cleanup] Remove unnecessary `utf-8` from `str.encode`/`bytes.decode` * [utils] LazyList: Expose unnecessarily "protected" attributes and other minor cleanup
* Allow use of weaker ciphers with `--legacy-server-connect`pukkandan2022-05-071-6/+10
| | | | Closes #2043
* Add support for SSL client certificate authentication (#3435)coletdev2022-05-021-0/+8
| | | | | | | Adds `--client-certificate`, `--client-certificate-key`, `--client-certificate-password` Authored-by: coletdjnz Co-authored-by: df <fieldhouse@gmx.net> Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
* Fix redirect HTTP method handling (#3577)coletdev2022-05-011-1/+13
| | | Authored by: coletdjnz
* [utils] `locked_file`: Ignore illegal seek on `truncate` (#3610)Justin Keogh2022-05-011-1/+5
| | | | | Closes #3557 Authored by: jakeogh
* [cleanup] Misc fixes (see desc)pukkandan2022-05-011-6/+6
| | | | | | | | * Do not warn when fixup is skipped for existing file * [fragment] Fix `--skip-unavailable-fragments` for HTTP Errors * [utils] write_string: Fix bug in 59f943cd5097e9bdbc3cb3e6b5675e43d369341a * [utils] parse_codecs: Subtitle codec is generally referred to as `scodec`. https://github.com/yt-dlp/yt-dlp/pull/2174#discussion_r790156048 * [docs] Remove note about permissions. Closes #3597
* [XAttrMetadata] Refactor and document dependenciespukkandan2022-05-011-72/+41
|
* [utils] YoutubeDLCookieJar: Detect and reject JSON file (#3599)Lesmiscore2022-05-011-0/+4
| | | Authored by: Lesmiscore
* [cleanup] Misc fixespukkandan2022-04-291-1/+3
| | | | Closes #3565, https://github.com/yt-dlp/yt-dlp/issues/3514#issuecomment-1105944364
* `--match-filter -` to interactively ask for each videopukkandan2022-04-281-4/+8
|
* [utils] `write_string`: Workaround newline issue in `conhost`pukkandan2022-04-281-0/+4
| | | | | | | | | On windows `conhost`, when `WINDOWS_VT_MODE` is enabled, `\n` is not actually sent if the window is exactly the length of printed line, and the line does not end with a white-space character. So the line-break disappears when resizing the window. Fixes #1863
* [compat/asyncio] Use `asyncio.all_tasks`pukkandan2022-04-261-4/+4
|
* Revert acbc64225006964cf52d316e007a77a1b5e2975bpukkandan2022-04-261-13/+8
| | | | | | Reverts "[utils] WebSocketsWrapper: Ignore warnings at websockets instantiation" The warning should not be suppressed. We need to address it
* [utils] WebSocketsWrapper: Ignore warnings at websockets instantiationLesmiscore2022-04-251-6/+13
| | | | | | | This also fixes crash caused by moving asyncio to .compat. Authored by: Lesmiscore Thanks: J.Chung at Discord (581418557871620106)
* [dependencies] Create module with all dependency importspukkandan2022-04-211-16/+9
|
* Don't imply `-s` for later stages of `-O`pukkandan2022-04-201-1/+1
|
* bugfix for a44ca5a470e09b5170fc9c3a46733f050fadbfae, ↵pukkandan2022-04-191-1/+1
| | | | | | 19a0394044bfad36cd665450271b8eb048a41c02, 77f9033095cd8e1092a80db67f2b577cf13f95a8 Closes #3472
* [cleanup] Misc cleanup and refactor (#2173)pukkandan2022-04-181-65/+38
|
* [utils] Fix WebSocketsWrapperpukkandan2022-04-151-0/+1
| | | | | Bug in 3cea3edd1ac1101bd709dfa0305509028118b163 Closes #3422
* [utils] certifi: Make sure the pem file existspukkandan2022-04-121-1/+2
| | | | Closes #3353
* [cleanup] Misc cleanup (#2173)pukkandan2022-04-121-7/+7
| | | | Authored by: fstirlitz, pukkandan
* [cleanup] Sort importspukkandan2022-04-121-13/+9
| | | | | | Using https://github.com/PyCQA/isort isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
* [cleanup] Upgrade syntaxpukkandan2022-04-121-54/+49
| | | | | | | | | | Using https://github.com/asottile/pyupgrade 1. `__future__` imports and `coding: utf-8` were removed 2. Files were rewritten with `pyupgrade --py36-plus --keep-percent-format` 3. f-strings were cherry-picked from `pyupgrade --py36-plus` Extractors are left untouched (except removing header) to avoid unnecessary merge conflicts
* [cleanup] Mark some compat variables for removal (#2173)pukkandan2022-04-121-26/+18
| | | | Authored by fstirlitz, pukkandan
* [cleanup] Remove unused code paths (#2173)felix2022-04-121-226/+21
| | | | | | | | | | | | | | | | | | | Notes: * `_windows_write_string`: Fixed in 3.6 * https://bugs.python.org/issue1602 * PEP: https://www.python.org/dev/peps/pep-0528 * Windows UTF-8 fix: Fixed in 3.3 * https://bugs.python.org/issue13216 * `__loader__`: is always present in 3.3+ * https://bugs.python.org/issue14646 * `workaround_optparse_bug9161`: Fixed in 2.7 * https://bugs.python.org/issue9161 Authored by: fstirlitz
* [utils] locked_file: Do not give executable bits for newly created filesLesmiscore2022-04-101-1/+1
| | | | Authored by: Lesmiscore
* [utils] `sanitize_path`: Fix when path is empty stringpukkandan2022-04-091-1/+1
|
* [test] Add `test_locked_file`pukkandan2022-04-071-2/+3
|
* [utils] locked_file: Fix non-blocking non-exclusive lockpukkandan2022-04-071-8/+5
|
* [utils] locked_file: Do not truncate files before locking (#2994)Justin Keogh2022-04-061-4/+19
| | | Authored by: jakeogh, pukkandan
* Do not lock downloading file on Windowspukkandan2022-04-051-0/+4
| | | | Closes #3124
* Do not prevent download if locking is unsupportedpukkandan2022-04-051-44/+47
| | | | | | | Closes #3022 Failure to lock download-archive is still fatal. This is consistent with youtube-dl's behavior
* [cleanup] Misc fixespukkandan2022-04-051-8/+11
| | | | | | Closes https://github.com/yt-dlp/yt-dlp/pull/3213, Closes https://github.com/yt-dlp/yt-dlp/pull/3117 Related: https://github.com/yt-dlp/yt-dlp/issues/3146#issuecomment-1077323114, https://github.com/yt-dlp/yt-dlp/pull/3277#discussion_r841019671, https://github.com/yt-dlp/yt-dlp/commit/a825ffbffa0bea322e3ccb44c6f8e01d8d9572fb#commitcomment-68538986, https://github.com/yt-dlp/yt-dlp/issues/2360, https://github.com/yt-dlp/yt-dlp/commit/5fa3c9a88f597625296981a4a26be723e65d4842#r70393519, https://github.com/yt-dlp/yt-dlp/commit/5fa3c9a88f597625296981a4a26be723e65d4842#r70393254
* [niconico] Fix extraction of thumbnails and uploader (#3266)Lesmiscore (Naoya Ozaki)2022-04-011-2/+5
|
* [utils] `traverse_obj`: Allow filtering by valuepukkandan2022-03-311-3/+3
|
* [utils] Add `try_call`pukkandan2022-03-311-6/+10
|
* [ffmpeg] Cache version datapukkandan2022-03-291-1/+3
| | | | Related: https://github.com/dasl-/pifi/issues/9
* [utils] Add `filter_dict`pukkandan2022-03-281-6/+6
|
* [youtube:tab] Fix duration extraction for shorts (#3171)coletdev2022-03-281-6/+6
| | | | Related: https://github.com/TeamNewPipe/NewPipe/issues/8034 Authored-by: coletdjnz
* [outtmpl] Limit changes during sanitizationpukkandan2022-03-271-15/+19
| | | | Closes #2761
* Ignore format-specific fields in initial pass of `--match-filter`pukkandan2022-03-251-4/+12
| | | | Closes #3074
* [utils] WebSocketsWrapper: Allow omitting `__enter__` invocation (#3187)Lesmiscore (Naoya Ozaki)2022-03-251-2/+5
| | | Authored by: Lesmiscore
* Treat multiple `--match-filters` as ORpukkandan2022-03-251-5/+7
| | | | Closes #3144