Commit Graph

139 Commits

Author SHA1 Message Date
Mike Fährmann
f67b99a7b4 [reddit] fix "KeyError: 'children'" when expanding comments (#9037) 2026-02-10 18:23:15 +01:00
Mike Fährmann
52a5e39fc6 [reddit:user] fix user lookup when using sub view (#8228 #9032)
e.g. USER/submitted or USER/comments
fixes regression introduced in c16892a150
2026-02-09 18:57:00 +01:00
Mike Fährmann
8eafa1564a [reddit] try to improve comment metadata (#8228)
* provide toplevel 'date'
* preserve 'submission' data
2026-02-07 21:47:17 +01:00
Mike Fährmann
935bdb6229 [reddit:user] implement 'only' option (#8228) 2026-02-07 21:47:17 +01:00
Mike Fährmann
c16892a150 [reddit:user] provide 'user' metadata field (#8228) 2026-02-07 21:47:17 +01:00
Mike Fährmann
00c6821a3f replace 2-element f-strings with simple '+' concatenations
Python's 'ast' module and its 'NodeVisitor' class
were incredibly helpful in identifying these
2025-12-22 11:26:04 +01:00
Mike Fährmann
717d38f38c [reddit] use '"videos": "dash"' by default (#8657)
https://github.com/mikf/gallery-dl/issues/8657#issuecomment-3663560902
2025-12-17 18:45:06 +01:00
Mike Fährmann
814085062a [reddit] guess 'mp4' extension for ytdl downloads (#8684) 2025-12-11 17:28:02 +01:00
Mike Fährmann
968597a302 yield 3-tuples for Message.Directory
adapt tuples to the same length and semantics as other messages
2025-12-05 21:39:52 +01:00
Mike Fährmann
3b33c25378 [reddit] use REST API by default (#8559) 2025-11-17 16:24:54 +01:00
Mike Fährmann
5da4fb38c6 [reddit] fix "KeyError: 'media_metadata'" for embeds (#8551) 2025-11-14 08:52:57 +01:00
Mike Fährmann
c8fc790028 merge branch 'dt': move datetime utils into separate module
- use 'datetime.fromisoformat()' when possible (#7671)
- return a datetime-compatible object for invalid datetimes
  (instead of a 'str' value)
2025-10-20 09:30:05 +02:00
enduser420
e2fb2c009c [reddit] support comment share link (#8434) 2025-10-18 18:41:23 +02:00
Mike Fährmann
085616e0a8 [dt] replace 'text.parse_datetime()' & 'text.parse_timestamp()' 2025-10-17 17:43:06 +02:00
Mike Fährmann
b225018eda [reddit] ensure 'comment' metadata field for media files (#8228) 2025-09-19 17:22:33 +02:00
Mike Fährmann
94c72a71fa [reddit] support video embeds (#8139) 2025-08-29 20:49:11 +02:00
Mike Fährmann
38542a8bba [reddit] fix 'TypeError' when processing comments (#8139) 2025-08-29 19:57:58 +02:00
Mike Fährmann
de05453707 [reddit] add 'limit' option (#7997 #8012 #8092)
change default value from 100 to null,
i.e. don't send a 'limit' parameter
2025-08-29 10:02:37 +02:00
Mike Fährmann
2eca790c87 [reddit] add 'api' option (#7997 #8012 #8092) 2025-08-28 22:52:57 +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
d8ef1d693f rename 'StopExtraction' to 'AbortExtraction'
for cases where StopExtraction was used to report errors
2025-07-09 21:07:28 +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
41191bb60a 'match.group(N)' -> 'match[N]' (#7671)
2.5x faster
2025-06-18 13:05:58 +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
88f1541a83 [common] add 'request_location()' convenience function 2025-04-19 16:45:05 +02:00
Mike Fährmann
486e307ecd [reddit] add 'selftext' option (#7111) 2025-03-08 09:01:50 +01:00
Mike Fährmann
7a11d02e7a [reddit] restrict subreddit search results (#7025) 2025-02-19 20:05:48 +01:00
Mike Fährmann
604879d1a3 [reddit] simplify
- use 'self.groups' to access matched values
- use 'str.format()' to build URL
2024-10-28 14:44:15 +01:00
inty
625fe0efce [reddit] support user profile share links 2024-10-28 14:58:06 +03:00
Mike Fährmann
b08da4ffc7 [reddit] add 'embeds' option (#6357) 2024-10-22 17:06:54 +02:00
Mike Fährmann
1824267447 [dl:ytdl] implement explicit HLS/DASH handling
add '_ytdl_manifest' to specify a manifest type to process
2024-10-16 15:16:21 +02:00
Mike Fährmann
141a93c8fd [docs] update docs/configuration links (#5059, #5369, #5423) 2024-04-13 02:18:44 +02:00
Mike Fährmann
095e5ded6f [reddit] support comment embeds (#5366) 2024-04-01 23:35:42 +02:00
Mike Fährmann
4565de3c8e [reddit] provide 'gif' and 'mp4' variant fallbacks (#5315) 2024-03-10 20:50:55 +01:00
Mike Fährmann
146459056c [reddit] provide 'fallback_url' as video fallback (#5296) 2024-03-07 15:58:01 +01:00
Mike Fährmann
57fc6fcf83 replace '24*3600' with '86400'
and generalize cache maxage values
2023-12-18 23:57:22 +01:00
Mike Fährmann
92fbf09643 remove single quotes in some logging messages (#4908)
('FileNotFoundError: [Errno 2] No such file or directory: ''')
->
(FileNotFoundError: [Errno 2] No such file or directory: '')
2023-12-11 19:13:45 +01:00
Mike Fährmann
e256434c9e use custom HTTPBasicAuth class
to support LazyPrompt as password
and to generate the Authorization header only once
instead of for every request
2023-12-07 01:40:31 +01:00
inty
b68aad3dab [reddit] implement Reddit Mobile share links 2023-10-22 10:38:05 +00:00
Mike Fährmann
8bb7243c10 [reddit] fix wrong previews (#4649)
caused by a failed comment URL
using the main submission's preview as fallback

14af15bd
4963bb9b
2023-10-10 18:33:01 +02:00
HRXN
ec91eeb7ef Update gallery_dl/extractor/reddit.py
Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
2023-09-26 14:00:29 +02:00
HRXN
66613c3a32 [reddit] ignore '/message/compose' URLs without www subdomain 2023-09-25 02:24:44 +02:00
Mike Fährmann
d7aac9fc06 [reddit] ignore '/message/compose' URLs (#4482) 2023-09-23 00:13:05 +02:00
Mike Fährmann
82296b1f05 [reddit] add 'previews' option (#4322)
another way to disable this new behavior
2023-09-22 18:10:44 +02:00
Mike Fährmann
4963bb9b30 [reddit] improve comment metadata v2 (#4482)
provide main submission metadata at the top level
and comment metadata inside the 'comment' field,
i.e. the other way round than in 1710f1e9
2023-09-20 22:12:40 +02:00
Mike Fährmann
27ec653991 fix bug in test_init and update example URLs 2023-09-14 13:27:03 +02:00
Mike Fährmann
6ae92da57e Merge branch 'tests' 2023-09-13 21:34:28 +02:00
Mike Fährmann
1710f1e983 [reddit] improve comment metadata (#4482)
- provide 'date'
- make metadata of the main submission available as 'submission[…]'
2023-09-12 22:00:04 +02:00
Mike Fährmann
a453335a9f remove test results in extractor modules
and add generic example URLs
2023-09-11 16:30:55 +02:00