Week 17, Update 04

This commit is contained in:
Sidney PEPO (aka sysb1n) 2024-01-06 00:01:07 -03:00
parent 4c4b151533
commit ea34a3bc24
Signed by: sidneypepo
GPG Key ID: A188DCCE6CD96D52
2 changed files with 7 additions and 2 deletions

View File

@ -267,7 +267,9 @@ def obter_programas():
def obter_historico():
historico = json.loads(browser_history.get_history().to_json())["history"]
if (len(historico) > 200):
if (len(historico) < 1):
return "Não há histórico disponível!"
elif (len(historico) > 200):
historico = historico[-200:]
retorno = ''

View File

@ -117,6 +117,9 @@ Exemplos:
retorno["text"] = f"```text\n{mensagem[:2048]}```"
requests.post(f"{TELEGRAM_API}/sendMessage", data=retorno)
mensagem = mensagem[2048:]
time.sleep(3)
try:
time.sleep(3)
except:
break
return