Update plugin.py

This commit is contained in:
Gordon Shumway 2019-06-17 00:56:05 -04:00 committed by GitHub
parent 5d23a2e46b
commit d7add5f02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -844,7 +844,7 @@ class ASCII(callbacks.Plugin):
ua = UserAgent()
header = {'User-Agent':str(ua.random)}
r = requests.head(url, headers=header)
if "text/plain" in r.headers["content-type"] and int(r.headers["content-length"]) < 1000000:
if "text/plain" in r.headers["content-type"]:
file = requests.get(url, headers=header)
else:
irc.reply("Invalid file type.", private=False, notice=False)