1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[reddit] fix 'preview.redd.it' URLs (#4470)

This commit is contained in:
Mike Fährmann 2023-08-28 17:17:03 +02:00
parent 06aaedded5
commit fd65f27ede
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -65,7 +65,10 @@ class RedditExtractor(Extractor):
media = submission
url = media["url"]
if url and url.startswith("https://i.redd.it/"):
if url and url.startswith((
"https://i.redd.it/",
"https://preview.redd.it/",
)):
text.nameext_from_url(url, submission)
yield Message.Url, url, submission
@ -309,6 +312,11 @@ class RedditSubmissionExtractor(RedditExtractor):
("https://www.reddit.com/r/kittengifs/comments/12m0b8d", {
"pattern": r"ytdl:https://v\.redd\.it/cvabpjacrvta1",
}),
# preview.redd.it (#4470)
("https://www.reddit.com/r/europe/comments/pm4531/the_name_of/", {
"pattern": r"https://preview.redd.it/u9ud4k6xaf271.jpg?auto=webp"
r"&s=19b1334cb4409111cda136c01f7b44c2c42bf9fb",
}),
("https://old.reddit.com/r/lavaporn/comments/2a00np/"),
("https://np.reddit.com/r/lavaporn/comments/2a00np/"),
("https://m.reddit.com/r/lavaporn/comments/2a00np/"),