add imgtc mime parser

This commit is contained in:
woorst
2017-10-10 17:37:38 -05:00
parent ae89262073
commit e49831bf4b
3 changed files with 70 additions and 0 deletions

View File

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