Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TJZine committed Apr 5, 2022
1 parent 3215ccb commit b31a32c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,7 @@ def is_image_url(url: str, **kwargs) -> str:
r"\1i.\2.png",
url,
)
elif url.startswith("https://imgur.com") or url.startswith("http://imgur.com"):
url = re.sub(
r"(http[s]?:\/\/)((?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)",
r"\1i.\2.jpg",
url,
)
elif url.startswith("https://tenor.com") or url.startswith("http://tenor.com"):
url = re.sub(
r"(http[s]?:\/\/)((?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)",
r"\1i.\2.gif",
url,
)

return parse_image_url(url, **kwargs)


Expand Down

0 comments on commit b31a32c

Please sign in to comment.