png: always allow paste.ee raw links

This commit is contained in:
Gordon Shumway 2019-12-06 09:55:13 -05:00 committed by GitHub
parent c2dc9632b4
commit 20867834aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -691,7 +691,7 @@ class IRCArt(callbacks.Plugin):
ua = UserAgent()
header = {'User-Agent':str(ua.random)}
r = requests.head(url, headers=header)
if "text/plain" in r.headers["content-type"]:
if "text/plain" in r.headers["content-type"] or url.startswith('https://paste.ee/r/'):
file = requests.get(url, headers=header)
else:
irc.reply("Invalid file type.", private=False, notice=False)