Skip to content

Commit

Permalink
[redgifs] support 'i.redgifs.com' URLs (closes #2300)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Feb 13, 2022
1 parent 655b2de commit 806bc62
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gallery_dl/extractor/redgifs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2020-2021 Mike Fährmann
# Copyright 2020-2022 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -106,15 +106,18 @@ def gifs(self):
class RedgifsImageExtractor(RedgifsExtractor):
"""Extractor for individual gifs from redgifs.com"""
subcategory = "image"
pattern = (r"(?:https?://)?(?:www\.)?(?:redgifs\.com/(?:watch|ifr)"
r"|gifdeliverynetwork.com)/([A-Za-z]+)")
pattern = (r"(?:https?://)?(?:"
r"(?:www\.)?redgifs\.com/(?:watch|ifr)|"
r"(?:www\.)?gifdeliverynetwork\.com|"
r"i\.redgifs\.com/i)/([A-Za-z]+)")
test = (
("https://redgifs.com/watch/foolishforkedabyssiniancat", {
"pattern": r"https://\w+\.redgifs\.com"
r"/FoolishForkedAbyssiniancat\.mp4",
"content": "f6e03f1df9a2ff2a74092f53ee7580d2fb943533",
}),
("https://redgifs.com/ifr/FoolishForkedAbyssiniancat"),
("https://i.redgifs.com/i/FoolishForkedAbyssiniancat"),
("https://www.gifdeliverynetwork.com/foolishforkedabyssiniancat"),
)

Expand Down

0 comments on commit 806bc62

Please sign in to comment.