214 Commits

Author SHA1 Message Date
Mike Fährmann
0f41f343f4 implement linear/exponential backoff for 'sleep-429' 2026-02-12 19:23:29 +01:00
Mike Fährmann
71680feab9 [actions] implement 'flag … = skip' (#8960) 2026-02-06 10:10:38 +01:00
Mike Fährmann
3c0509e80c [dl:ytdl] implement '_ytdl_manifest_remux' 2026-01-06 21:53:16 +01:00
Mike Fährmann
c8c4575c7f [dl:http] add MIME type and signature for .aac files 2025-12-29 19:05:34 +01:00
Mike Fährmann
e12b17649a [dl:ytdl] support '_ytdl_params' 2025-12-28 23:35:21 +01:00
Mike Fährmann
5427e337d4 [dl:ytdl] unset '_mtime_http' (#8767)
prevent an mtime value from a previous HTTP download
from being reused for a file downloaded by 'ytdl'
2025-12-28 22:46:52 +01:00
Mike Fährmann
207f6137c5 [dl:ytdl] fix "UnboundLocalError: 'tries'" (#8707)
fixes regression introduced in 402f53616b
2025-12-15 08:43:26 +01:00
Mike Fährmann
b891c0301e [dl:ytdl] improve error detection
- intercept ytdl logging messages and signal error when it
  emits an error message
- remove "ERROR:" etc from ytdl logging messages
2025-12-12 15:59:18 +01:00
Mike Fährmann
c2c00d1779 [dl:ytdl] forward '_ytdl_manifest_headers' to formats 2025-12-10 18:34:18 +01:00
Mike Fährmann
efad90696d [dl:http] fail downloads of empty files (#8661) 2025-12-09 11:18:52 +01:00
Mike Fährmann
e3875127af [dl:ytdl] fix 'AttributeError' when ytdl returns None (#8660)
fixes regression introduced in 402f53616b
2025-12-08 18:39:30 +01:00
Mike Fährmann
402f53616b [dl:ytdl] implement 'retry' functionality (#1131 #8269)
for 'info_dict' extraction and file download
2025-12-04 20:43:10 +01:00
Mike Fährmann
1f6577240d [dl:ytdl] update '_extract_manifest()'
- use 'kwdict' as single argument
- fix '_parse_m3u8_formats_and_subtitles' arguments
2025-12-04 19:13:28 +01:00
Mike Fährmann
8f91daa9bc [dl:ytdl] improve error message when importing default ytdl modules 2025-12-04 18:28:09 +01:00
Mike Fährmann
918b06caf4 [dl:ytdl] restructure code 2025-12-04 18:14:27 +01:00
Mike Fährmann
4e2987e007 [path] implement conditional 'part-directory' (#8329) 2025-12-03 11:19:44 +01:00
Mike Fährmann
cff04f1181 [dl:http] implement '_http_segmented' (#8602) 2025-11-30 19:23:10 +01:00
Mike Fährmann
3deb5a413d improve arguments for relative '__import__()'
using None for 'fromlist' is slightly faster than an empty tuple
2025-10-21 12:06:50 +02:00
Mike Fährmann
8c62be343e [output] add 'Logger.traceback()' helper 2025-10-14 18:44:29 +02:00
Mike Fährmann
45f364e09e [dl:http] add MIME type and signature for m3u8 & mpd files (#8339) 2025-10-03 16:48:10 +02:00
Mike Fährmann
b9fd9103d4 [dl:ytdl] move 'http.cookiejar.Cookie' import to top of file 2025-09-05 13:43:46 +02:00
Mike Fährmann
1c9f4ff867 [dl:ytdl] support '_ytdl_manifest_cookies' 2025-09-02 22:12:51 +02:00
Mike Fährmann
5f9c8ee195 [dl:ytdl] pass 'ignoreerrors' as YoutubeDL param (#8085) 2025-08-22 23:12:26 +02:00
Mike Fährmann
1dcf6615b4 [dl:ytdl] improve playlist filename handling 2025-08-22 22:50:51 +02:00
Mike Fährmann
81df42103e [dl:ytdl] handle exceptions when processing playlists (#8085)
and prevent calling 'process_info()' with empty playlist entries
2025-08-22 22:32:46 +02:00
Mike Fährmann
5051045707 [dl:http] emit debug message when 'adjust-extension' triggers 2025-08-18 15:14:40 +02:00
Mike Fährmann
9dfdeb05a7 [dl:ytdl] don't overwrite existing filenames (#7964) 2025-08-03 19:14:01 +02:00
Mike Fährmann
a097a373a9 simplify if statements by using walrus operators (#7671) 2025-07-22 20:57:54 +02:00
Mike Fährmann
755434600e [signals] implement stopping the current download with Ctrl+C (#1861)
{
    "signals-actions": {
        "SIGINT": "download:fail"
    }
}
2025-07-11 22:29:08 +02:00
Mike Fährmann
ed64b484ff [ytdl] use '__gdl_initialize' key to trigger init code 2025-07-06 18:29:00 +02:00
Mike Fährmann
13ef48f04a [dl:ytdl] implement dynamic download 'rate' limits (#7638) 2025-07-05 23:07:42 +02:00
Mike Fährmann
9dbe33b6de replace old %-formatted and .format(…) strings with f-strings (#7671)
mostly using flynt
https://github.com/ikamensh/flynt
2025-06-29 17:50:19 +02:00
Mike Fährmann
9e56d81292 fix Last-Modified mtime overwriting post processor mtime (#7529)
https://github.com/mikf/gallery-dl/issues/7529#issuecomment-2989955455

- split '_mtime' into '_mtime_http' and '_mtime_meta'
- add PathFormat.set_mtime() method
2025-06-20 16:19:37 +02:00
Mike Fährmann
bcfce6b7db [dl:http] improve HTML signature check (#7697)
https://github.com/mikf/gallery-dl/issues/7697#issuecomment-2990734451

ignore leading whitespace
2025-06-20 14:39:32 +02:00
Mike Fährmann
dba45923c8 [dl:http] fail downloads with HTML content (#7697)
add 'validate-html' option
2025-06-20 14:34:40 +02:00
Mike Fährmann
e08ec7e083 update copyright notices 2025-06-13 00:03:41 +02:00
Mike Fährmann
811b665e33 remove @staticmethod decorators
There might have been a time when calling a static method was faster
than a regular method, but that is no longer the case. According to
micro-benchmarks, it is 70% slower in CPython 3.13 and it also makes
executing the code of a class definition slower.
2025-06-12 22:50:52 +02:00
Mike Fährmann
8b6bc54e95 [dl:http] add MIME type and signature for .html files 2025-06-12 21:16:34 +02:00
Mike Fährmann
e0a961047c [dl:http] fix potential FileExistsError when '.part' file moved (#5385)
when the downloader detects a '.part' file and attempts to resume its
download, a FileExistsError was raised while trying to create an assumed
missing directory path when said '.part' file was (re)moved during the
time it was detected and the downloader attempted to open it in 'a+b' mode.
2025-06-12 16:44:41 +02:00
Mike Fährmann
7a48b696a6 [dl] improve maximum 'rate' detection (#7638) 2025-06-09 12:15:39 +02:00
Mike Fährmann
a25e14e776 [dl:http] implement dynamic download 'rate' limits (#7638) 2025-06-08 20:04:31 +02:00
Mike Fährmann
483e30d846 [dl:http] allow '_http_signature' to return a custom error message
… and fail the download immediately like '_http_validate'
2025-06-07 22:06:00 +02:00
Mike Fährmann
839a43fe5c [dl:http] implement '_http_signature' (#4902)
allows passing a function to validate a file's signature bytes,
similar to '_http_validate'
2025-06-07 20:27:59 +02:00
Mike Fährmann
f51511155e [dl:http] include traceback in exception debug log 2025-06-07 20:24:08 +02:00
Mike Fährmann
a798b8971e [dl:ytdl] fix postprocessing/merge errors (#7581)
don't use a hardcoded '.part' filename extension

fixes regression introduced in 29d315e495
2025-05-26 18:56:40 +02:00
Mike Fährmann
e05b82253a [dl:ytdl] support custom headers when fetching HLS/DASH manifests 2025-05-26 17:17:37 +02:00
Mike Fährmann
3e7a5fcb00 [dl:ytdl] fix crash when using legacy 'youtube_dl' (#6949)
https://github.com/mikf/gallery-dl/issues/6949#issuecomment-2906920039

fixes regression introduced in 29d315e495
2025-05-24 19:58:09 +02:00
Mike Fährmann
b76e7de1a7 [dl:http] fix setting 'mtime' per file (#7529)
introduce '_http_lastmodified' meta field
2025-05-21 13:50:51 +02:00
Mike Fährmann
29d315e495 [dl:ytdl] improve temp/part file handling (#6949 #7494)
- fixes files not being moved from 'part-directory' (#6949)
- fixes 'skip: enumerate' overwriting files (#7494)
2025-05-21 13:50:07 +02:00
Mike Fährmann
1772c233e4 [dl:ytdl] fix exception when ytdl reports an error (#7301)
when using the HLS/DASH download functionality
2025-04-08 17:02:35 +02:00