Update plugin.py

This commit is contained in:
Gordon Shumway 2019-07-14 21:33:57 -04:00 committed by GitHub
parent d66a75ecdf
commit b99b8644c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1254,7 +1254,6 @@ class ASCII(callbacks.Plugin):
ua = UserAgent()
header = {'User-Agent':str(ua.random)}
r = requests.head(url, headers=header)
irc.reply(r.headers)
try:
if "text/plain" in r.headers["content-type"] or "application/octet-stream" in r.headers["content-type"] and int(r.headers["content-length"]) < 1000000:
path = os.path.dirname(os.path.abspath(__file__))