imgur url hashids aren't always 7 characters

This commit is contained in:
jesopo 2018-10-31 16:29:24 +00:00
parent bf6a740f7b
commit 8212fc51eb

View file

@ -3,7 +3,7 @@
import re import re
from src import ModuleManager, utils from src import ModuleManager, utils
REGEX_IMAGE = re.compile("https?://(?:i\.)?imgur.com/(\w{7})") REGEX_IMAGE = re.compile("https?://(?:i\.)?imgur.com/(\w+)")
URL_IMAGE = "https://api.imgur.com/3/image/%s" URL_IMAGE = "https://api.imgur.com/3/image/%s"
class Module(ModuleManager.BaseModule): class Module(ModuleManager.BaseModule):