Commit Graph

124 Commits

Author SHA1 Message Date
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
Mike Fährmann
7defb24e1e [reddit] provide video previews if available (#4322) 2023-08-28 22:22:10 +02:00
Mike Fährmann
fd65f27ede [reddit] fix 'preview.redd.it' URLs (#4470) 2023-08-28 17:17:03 +02:00
Mike Fährmann
14af15bd18 [reddit] download preview for 404ed imgur links (#4322)
This is a pretty ugly hack as the internal infrastructure doesn't
really support switching from external URL to regular download in
case the former fails, but it kind of works ...

Can be disabled by setting 'reddit.fallback' to 'false'.
2023-08-24 15:41:05 +02:00
Mike Fährmann
d97b8c2fba consistent cookie-related names
- rename every cookie variable or method to 'cookies_*'
- simplify '.session.cookies' to just '.cookies'
- more consistent 'login()' structure
2023-07-22 01:20:50 +02:00
Mike Fährmann
c6b31a2169 [reddit] set default 0.6s delay between requests (#4292)
to limit API requests to 100 per minute
https://www.reddit.com/r/redditdev/comments/14nbw6g/
2023-07-14 14:41:16 +02:00
Mike Fährmann
f079d9a703 [reddit] notify users about registering an oauth application
(#4292, #4253, #3943)
2023-07-12 21:43:00 +02:00
Mike Fährmann
94b6a67666 [reddit] fix crash with empty 'crosspost_parent_lists' (#4120) 2023-06-01 14:51:58 +02:00
Mike Fährmann
f8c4c5eef9 [reddit] simplify and add tests 2023-05-25 13:15:11 +02:00
Alexandru Vasilescu
d4f8b2fe22 fix: linter issues 2023-04-28 13:45:23 +03:00
Alexandru Vasilescu
1b918bd937 fix(extractor): fix extraction for cross-posted reddit videos and galleries 2023-04-28 13:13:25 +03:00
Mike Fährmann
3fc2223893 merge #3935: [reddit] match 'preview.redd.it' URLs 2023-04-21 20:09:20 +02:00
Mike Fährmann
202f5d86a7 [reddit] ignore 'id-max' value "zik0zj"/2147483647
(#3939, #3862, #3697, #3606, #3546, #3521, #3412)
2023-04-21 15:08:50 +02:00
ClosedPort22
cd4bfb0dd1 [reddit] match 'preview.redd.it' URLs 2023-04-20 15:54:09 +08:00
Mike Fährmann
da9840a39d [reddit] update 'videos' option (#3712)
- add 'dash' to directly extract DASH manifest URLs
  (was default behavior since a7c79531)
- change default strategy back to before a7c79531
- disable 'Falling back on generic information extractor' warning
2023-03-06 12:18:25 +01:00
Mike Fährmann
2952add4a8 [reddit] increase 'id-max' default value (#3397)
to float("inf")
2022-12-12 12:10:06 +01:00