lstrip text html check
This commit is contained in:
parent
30d1aeb5a1
commit
2e7c3399e4
|
|
@ -594,7 +594,7 @@ class ASCII(callbacks.Plugin):
|
|||
if url.startswith("https://paste.ee/p/"):
|
||||
url = re.sub("https://paste.ee/p/", "https://paste.ee/r/", url)
|
||||
file = requests.get(url)
|
||||
if "<!DOCTYPE html>" in file.text.splitlines()[:10]:
|
||||
if "<!DOCTYPE html>" in file.text.lstrip().splitlines()[:10]:
|
||||
irc.reply("Error: ansi2irc requires a text file as input.", private=False, notice=False)
|
||||
return
|
||||
elif url.endswith(".txt") or url.startswith("https://pastebin.com/raw/") or url.startswith("https://paste.ee/r/"):
|
||||
|
|
@ -636,7 +636,7 @@ class ASCII(callbacks.Plugin):
|
|||
delay = self.registryValue('delay', msg.args[0])
|
||||
try:
|
||||
file = requests.get(url)
|
||||
if "<!DOCTYPE html>" in file.text.splitlines()[:10]:
|
||||
if "<!DOCTYPE html>" in file.text.lstrip().splitlines()[:10]:
|
||||
irc.reply("Error: ansi2irc requires a text file as input.", private=False, notice=False)
|
||||
return
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in New Issue