Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
9b6c53b372 |
|
@ -68,6 +68,20 @@ class Priberam(callbacks.Plugin):
|
||||||
return
|
return
|
||||||
|
|
||||||
definitions = soup.find('div', {'id': 'resultados'}).find_all('p')
|
definitions = soup.find('div', {'id': 'resultados'}).find_all('p')
|
||||||
|
if (len(definitions) > 1):
|
||||||
|
if (position < len(definitions)):
|
||||||
|
nextPos = position + 1
|
||||||
|
splitStr = str(msg).split()
|
||||||
|
commandUsed = splitStr[3]
|
||||||
|
count = 4
|
||||||
|
while (count < len(splitStr)):
|
||||||
|
if (splitStr[count].strip('\n') == word):
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
commandUsed = commandUsed + ' ' + splitStr[count]
|
||||||
|
count += 1
|
||||||
|
outputResultados = ("{0} definições encontradas; {1} {2} {3} para a próxima").format(len(definitions), commandUsed[1:], word, nextPos)
|
||||||
|
irc.reply(outputResultados, prefixNick=False)
|
||||||
if position > len(definitions):
|
if position > len(definitions):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue