Commit Graph

194 Commits (e06bd8800fb98e9dc1537e9f1ebf3aaeea5d9b8c)

Author SHA1 Message Date
pukkandan abfecb7bc1
[utils] Fix WebSocketsWrapper
Bug in 3cea3edd1a
Closes 
pukkandan b07897ef5b
[utils] certifi: Make sure the pem file exists
Closes 
pukkandan e5a998f368
[cleanup] Misc cleanup ()
Authored by: fstirlitz, pukkandan
pukkandan f82711587c
[cleanup] Sort imports
Using https://github.com/PyCQA/isort

    isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
pukkandan 86e5f3ed2e
[cleanup] Upgrade syntax
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
pukkandan f9934b9614
[cleanup] Mark some compat variables for removal ()
Authored by fstirlitz, pukkandan
felix cfb0511d82
[cleanup] Remove unused code paths ()
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
Lesmiscore 98804d034d
[utils] locked_file: Do not give executable bits for newly created files
Authored by: Lesmiscore
pukkandan 4abea8ca0a
[utils] `sanitize_path`: Fix when path is empty string
pukkandan b506289fe2
[test] Add `test_locked_file`
pukkandan b63837bce0
[utils] locked_file: Fix non-blocking non-exclusive lock
Justin Keogh fcfa8853e4
[utils] locked_file: Do not truncate files before locking ()
Authored by: jakeogh, pukkandan
pukkandan 8973767198
Do not lock downloading file on Windows
Closes 
pukkandan 0edb3e336c
Do not prevent download if locking is unsupported
Closes 

Failure to lock download-archive is still fatal.
This is consistent with youtube-dl's behavior
pukkandan a44ca5a470
[cleanup] Misc fixes
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, a825ffbffa (commitcomment-68538986), https://github.com/yt-dlp/yt-dlp/issues/2360, 5fa3c9a88f (r70393519), 5fa3c9a88f (r70393254)
Lesmiscore (Naoya Ozaki) 5d45484cc7
[niconico] Fix extraction of thumbnails and uploader ()
pukkandan e6f868a63c
[utils] `traverse_obj`: Allow filtering by value
pukkandan c4f60dd7cd
[utils] Add `try_call`
pukkandan 8a7f68d0b1
[ffmpeg] Cache version data
Related: https://github.com/dasl-/pifi/issues/9
pukkandan 90137ca4be
[utils] Add `filter_dict`
coletdev 1c1b2f96ae
[youtube:tab] Fix duration extraction for shorts ()
Related: https://github.com/TeamNewPipe/NewPipe/issues/8034
Authored-by: coletdjnz
pukkandan 5c3895fff1
[outtmpl] Limit changes during sanitization
Closes 
pukkandan 6db9c4d57d
Ignore format-specific fields in initial pass of `--match-filter`
Closes 
Lesmiscore (Naoya Ozaki) 3cea3edd1a
[utils] WebSocketsWrapper: Allow omitting `__enter__` invocation ()
Authored by: Lesmiscore
pukkandan b1a7cd056a
Treat multiple `--match-filters` as OR
Closes 
pukkandan 28787f16c6
[downloader] Fix invocation of `HttpieFD`
Closes 
coletdev af14914baa
Remove `Accept-Encoding` header from `std_headers` ()
This should be set by each downloader to what it supports.
Fixes https://github.com/yt-dlp/yt-dlp/issues/3142
Authored-by: coletdjnz
coletdev d5820461e8
Use certificates from `certifi` if installed ()
Fixes  and most `CERTIFICATE_VERIFY_FAILED` issues

Authored by: coletdjnz
s0u1h eeb2a770f3
[utils] `format_decimal_suffix`: Fix for very large numbers ()
Authored by: s0u1h
pukkandan 592b748582
[cleanup] Minor cleanup
Closes 
pukkandan 76aa991374
Fix case of `http_headers`
Bug in 8b7539d27c

Fixes https://github.com/yt-dlp/yt-dlp/issues/1346#issuecomment-1064527765
pukkandan e491d06d34
[utils] ExtractorError: Fix for older python versions
Closes 
pukkandan ff91cf7483
[utils] Add `get_first`
pukkandan d1b5f70bc9
[cleanup] Refactor `__init__.py` ()
* Split `__init__` code into multiple functions
* Clean up validation code by grouping similar types of options
* Expose `parse_options` to third parties
pukkandan 08d30158ec
[cleanup, docs] Misc cleanup
Closes , closes , closes , closes 
coletdev 4390d5ec12
Add brotli content-encoding support ()
Authored by: coletdjnz
pukkandan 497d2fab6c
[utils] Better traceback for `ExtractorError`
Lesmiscore 1ed7953a74
[utils] render_table: Fix character calculation for removing extra gap
without this fix, the column next to delimiter will lack leading spaces on terminal (see https://github.com/yt-dlp/yt-dlp/pull/920#issuecomment-1059914615 for the situation)
Zenon Mousmoulas 27231526ae
[ant1newsgr] Add extractor ()
Authored by: zmousm
pukkandan 8b7539d27c
Implement `--add-header` without modifying `std_headers`
Closes , 
pukkandan 4c3f8c3fb6
Handle negative duration from extractor
Closes 
pukkandan 7265a2190c
Fix doubling of `video_id` in `ExtractorError`
pukkandan 747c0bd127
[utils] Improve file locking
* Implement non-blocking locks for windows
* Don't raise error when closing a closed file
Justin Keogh acea8d7cfb
[utils] Fix file locking for AOSP ()
Closes , 

Authored by: jakeogh
pukkandan f1d130902b
[utils] OnDemandPagedList: Do not download pages after error
Lesmiscore (Naoya Ozaki) 93c8410d33
[downloader/fragment] Fix bugs around resuming with Range ()
Authored by: Lesmiscore
Lesmiscore (Naoya Ozaki) 15dfb3929c
[fc2:live] Add extractor ()
Authored by: Lesmiscore
Lesmiscore (Naoya Ozaki) 3e9b66d761
[AbemaTV] Add extractors ()
Authored by: Lesmiscore
pukkandan 09b49e1f68
Add pre-processor stage `after_filter`
* Move `_match_entry` and `post_extract` to `process_video_result`. It is also left in `process_info` for API compat
* `--list-...` options and `--force-write-archive` now obey filtering options
* Move `SponsorBlockPP` to `after_filter`. Closes https://github.com/yt-dlp/yt-dlp/issues/2536
* Reverts 4ec82a72bb since this commit addresses the issue it was solving
Bepis febff4c119
[tubitv] Fix/improve TV series extraction ()
Authored by: bbepis