add imgflip.com mime parser

This commit is contained in:
woorst
2017-10-11 07:58:08 -05:00
parent e49831bf4b
commit 359c1d77a9
3 changed files with 140 additions and 0 deletions

View File

@@ -417,6 +417,13 @@ class ImgtcMIMEParser(OpenGraphMIMEParser):
pattern = re.compile(r'https?://(www\.)?imgtc\.com/w/[^.]+$')
class ImgflipMIMEParser(OpenGraphMIMEParser):
"""
imgflip.com uses the Open Graph protocol
"""
pattern = re.compile(r'https?://(www\.)?imgflip\.com/i/[^.]+$')
# Parsers should be listed in the order they will be checked
parsers = [
ClippitUserMIMEParser,
@@ -434,5 +441,6 @@ parsers = [
GifsMIMEParser,
GiphyMIMEParser,
ImgtcMIMEParser,
ImgflipMIMEParser,
GifvMIMEParser,
BaseMIMEParser]