Update plugin.py
This commit is contained in:
parent
5d23a2e46b
commit
d7add5f02f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue