forked from swee/MeowNex
Update sweebot.py
This commit is contained in:
parent
d4b8322f35
commit
0b61251601
1 changed files with 17 additions and 18 deletions
|
@ -566,18 +566,17 @@ while True:
|
||||||
elif ":3c" in command:
|
elif ":3c" in command:
|
||||||
if not sbconfig.cflagexist(channel, "-colonthree"):
|
if not sbconfig.cflagexist(channel, "-colonthree"):
|
||||||
multiline(choice(threes), channel)
|
multiline(choice(threes), channel)
|
||||||
else:
|
|
||||||
# try to parse and find a link
|
# try to parse and find a link
|
||||||
if sbconfig.cflagexist(channel, "+links"):
|
if sbconfig.cflagexist(channel, "+links"):
|
||||||
for i in command:
|
for i in command:
|
||||||
if i[:7] == "https://":
|
if i[:8] == "https://":
|
||||||
e = get(i)
|
e = get(i)
|
||||||
if e.ok:
|
if e.ok:
|
||||||
soup = BeautifulSoup(e.text, 'html.parser')
|
soup = BeautifulSoup(e.text, 'html.parser')
|
||||||
multiline("(" + nick + ") " + soup.title.string if soup.title.string != None else "[No title provided]", channel)
|
multiline("(" + nick + ") " + soup.title.string if soup.title.string != None else "[No title provided]", channel)
|
||||||
else:
|
else:
|
||||||
multiline("(" + nick + ") HTTP " + str(e.status_code), channel)
|
multiline("(" + nick + ") HTTP " + str(e.status_code), channel)
|
||||||
elif i[:6] == "http://":
|
elif i[:7] == "http://":
|
||||||
e = get(i)
|
e = get(i)
|
||||||
if e.ok:
|
if e.ok:
|
||||||
soup = BeautifulSoup(e.text, 'html.parser')
|
soup = BeautifulSoup(e.text, 'html.parser')
|
||||||
|
|
Loading…
Reference in a new issue