aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/downloader/http.py
Commit message (Collapse)AuthorAgeFilesLines
* [compat, networking] Deprecate old functions (#2861)coletdjnz2023-07-151-20/+21
| | | | Authored by: coletdjnz, pukkandan
* [networking] Rewrite architecture (#2861)coletdjnz2023-07-151-19/+5
| | | | | | | | | | | | | | | | New networking interface consists of a `RequestDirector` that directs each `Request` to appropriate `RequestHandler` and returns the `Response` or raises `RequestError`. The handlers define adapters to transform its internal Request/Response/Errors to our interfaces. User-facing changes: - Fix issues with per request proxies on redirects for urllib - Support for `ALL_PROXY` environment variable for proxy setting - Support for `socks5h` proxy - Closes https://github.com/yt-dlp/yt-dlp/issues/6325, https://github.com/ytdl-org/youtube-dl/issues/22618, https://github.com/ytdl-org/youtube-dl/pull/28093 - Raise error when using `https` proxy instead of silently converting it to `http` Authored by: coletdjnz
* [downloader/http] Avoid infinite loop when no data is receivedpukkandan2023-07-061-5/+5
| | | | Closes #7504
* Update to ytdl-commit-d1c6c5pukkandan2023-05-241-1/+2
| | | | | | | | | | | [YouTube] [core] Improve platform debug log, based on yt-dlp https://github.com/ytdl-org/youtube-dl/commit/d1c6c5c4d618fa950813c0c71aede34a5ac851e9 Except: * 6ed34338285f722d0da312ce0af3a15a077a3e2a [jsinterp] Add short-cut evaluation for common expression * There was no performance improvement when tested with https://github.com/ytdl-org/youtube-dl/issues/30641 * e8de54bce50f6f77a4d7e8e80675f7003d5bf630 [core] Handle `/../` sequences in HTTP URLs * We plan to implement this differently
* [core] Deprecate internal `Youtubedl-no-compression` header (#6876)coletdjnz2023-05-201-2/+2
| | | Authored by: coletdjnz
* [utils] Don't use Content-length with encoding (#6176)Felix Yan2023-02-171-1/+6
| | | | Authored by: felixonmars Closes #3772, #6178
* Standardize retry mechanism (#1649)pukkandan2022-08-021-15/+7
| | | | | | | * [utils] Create `RetryManager` * Migrate all retries to use the manager * [extractor] Add wrapper methods for convenience * Standardize console messages for retries * Add `--retry-sleep` for extractors
* [http] Ensure the file handle is always closedpukkandan2022-07-111-6/+12
| | | | Closes #4323
* [cleanup] Consistent style for file headspukkandan2022-06-251-1/+1
|
* [compat] Remove more functionspukkandan2022-06-251-5/+6
| | | | Removing any more will require changes to a large number of extractors
* [cleanup] Miscpukkandan2022-05-211-9/+7
|
* [http] Fix bug in retrying on read timeout in py < 3.10coletdjnz2022-05-171-1/+8
| | | | | | socket.timeout is not an alias of TimeoutError in py < 3.10 Fixes bug in https://github.com/yt-dlp/yt-dlp/commit/a2e77303e3385da640a0904cd6cb76235fa9691b Authored-by: coletdjnz
* [cleanup] Minor fixes (See desc)pukkandan2022-05-091-3/+3
| | | | | | | | | | * [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
* [cleanup] Sort importspukkandan2022-04-121-8/+5
| | | | | | Using https://github.com/PyCQA/isort isort -m VERTICAL_HANGING_INDENT --py 36 -l 80 --rr -n --tc .
* [cleanup] Upgrade syntaxpukkandan2022-04-121-6/+6
| | | | | | | | | | 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
* [http] Fix #3215pukkandan2022-04-051-1/+2
|
* [cleanup] Misc fixespukkandan2022-04-051-15/+5
| | | | | | 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
* [utils] Add `try_call`pukkandan2022-03-311-3/+3
|
* [http] Reject broken range before request (#3079)Lesmiscore (Naoya Ozaki)2022-03-181-9/+16
| | | | | | * And fix filesize estimate for byterange downloads Closes #2001 Authored by: Lesmiscore, Jules-A, pukkandan
* [downloader/http] Retry on more errors (#3065)coletdev2022-03-181-26/+14
| | | | | Closes #3056, #2071 Related: #3034, #2969 Authored-by: coletdjnz
* [downloader/fragment] Fix bugs around resuming with Range (#2901)Lesmiscore (Naoya Ozaki)2022-02-281-18/+30
| | | Authored by: Lesmiscore
* Add option `--file-access-retries` (#2066)Emanuel Hoogeveen2021-12-231-2/+1
| | | | Closes #517 Authored by: ehoogeveen-medweb
* [http] Retry on socket timeoutpukkandan2021-10-191-3/+5
| | | | Closes #1222
* [http] Show the last encountered errorpukkandan2021-10-141-0/+2
| | | | Closes #1262
* [downloader] Fix throttledratelimitpukkandan2021-10-101-2/+3
| | | | The timer should not reset at start of each block
* [cleanup] Misc cleanuppukkandan2021-10-091-2/+2
|
* [http] Respect user-provided chunk size over extractor'spukkandan2021-10-091-1/+2
|
* Basic framework for simultaneous download of multiple formats (#1036)The Hatsune Daishi2021-09-221-0/+2
| | | Authored by: nao20010128nao
* Revert erroneous use of the `Content-Length` header (#637)Felix S2021-08-111-1/+1
| | | | | | | | | | | This reverts commit 6c907eb33ffd79ef9c4761c6460acb31b2eded46 The use of the Content-Length value here is erroneous and may lead to truncated downloads if a compression scheme is specified in the Content-Encoding header, as the Content-Length header refers to the size of encoded data, not of the raw bytestream. This has been noticed in the wild with WebVTT subtitle segments. Authored by: fstirlitz
* [downloader] Pass `info_dict` to `progress_hook`spukkandan2021-07-221-3/+3
|
* Add option `--throttled-rate` below which video data is re-extractedpukkandan2021-06-231-0/+14
| | | | | | Currently only for HTTP downloads Closes #430, workaround for https://github.com/ytdl-org/youtube-dl/issues/29326
* Completely change project name to yt-dlp (#85)Pccode662021-02-251-0/+365
* All modules and binary names are changed * All documentation references changed * yt-dlp no longer loads youtube-dlc config files * All URLs changed to point to organization account Co-authored-by: Pccode66 Co-authored-by: pukkandan