rerere
This commit is contained in:
@@ -3,7 +3,8 @@ INTERVALO_MINIMO_CLIQUE=15
|
|||||||
INTERVALO_MAXIMO_CLIQUE=30
|
INTERVALO_MAXIMO_CLIQUE=30
|
||||||
INTERVALO_PRIMEIRO_CLIQUE=10
|
INTERVALO_PRIMEIRO_CLIQUE=10
|
||||||
MAXIMO_CLIQUES_POR_SESSAO=60
|
MAXIMO_CLIQUES_POR_SESSAO=60
|
||||||
INTERVALO_ENTRE_SESSOES=3600
|
INTERVALO_ENTRE_SESSOES=3300
|
||||||
|
INTERVALO_CLIQUE_ESPERA=900
|
||||||
MAXIMO_FALHAS=3
|
MAXIMO_FALHAS=3
|
||||||
HORA_INICIO=09:00
|
HORA_INICIO=09:00
|
||||||
HORA_FIM=18:00
|
HORA_FIM=18:00
|
||||||
|
|||||||
Binary file not shown.
@@ -24,6 +24,7 @@ INTERVALO_MAXIMO_CLIQUE = int(os.getenv("INTERVALO_MAXIMO_CLIQUE", "30"))
|
|||||||
INTERVALO_PRIMEIRO_CLIQUE = int(os.getenv("INTERVALO_PRIMEIRO_CLIQUE", "10"))
|
INTERVALO_PRIMEIRO_CLIQUE = int(os.getenv("INTERVALO_PRIMEIRO_CLIQUE", "10"))
|
||||||
MAXIMO_CLIQUES_POR_SESSAO = int(os.getenv("MAXIMO_CLIQUES_POR_SESSAO", "20"))
|
MAXIMO_CLIQUES_POR_SESSAO = int(os.getenv("MAXIMO_CLIQUES_POR_SESSAO", "20"))
|
||||||
INTERVALO_ENTRE_SESSOES = int(os.getenv("INTERVALO_ENTRE_SESSOES", "60"))
|
INTERVALO_ENTRE_SESSOES = int(os.getenv("INTERVALO_ENTRE_SESSOES", "60"))
|
||||||
|
INTERVALO_CLIQUE_ESPERA = int(os.getenv("INTERVALO_CLIQUE_ESPERA", "900"))
|
||||||
MAXIMO_FALHAS = int(os.getenv("MAXIMO_FALHAS", "5"))
|
MAXIMO_FALHAS = int(os.getenv("MAXIMO_FALHAS", "5"))
|
||||||
HORA_INICIO = os.getenv("HORA_INICIO", "09:00")
|
HORA_INICIO = os.getenv("HORA_INICIO", "09:00")
|
||||||
HORA_FIM = os.getenv("HORA_FIM", "18:00")
|
HORA_FIM = os.getenv("HORA_FIM", "18:00")
|
||||||
@@ -87,6 +88,7 @@ def painel_config() -> None:
|
|||||||
(C_CYAN, "Espera antes do 1º clique", f"{INTERVALO_PRIMEIRO_CLIQUE}s"),
|
(C_CYAN, "Espera antes do 1º clique", f"{INTERVALO_PRIMEIRO_CLIQUE}s"),
|
||||||
(C_YELLOW, "Máximo de cliques por sessão", str(MAXIMO_CLIQUES_POR_SESSAO)),
|
(C_YELLOW, "Máximo de cliques por sessão", str(MAXIMO_CLIQUES_POR_SESSAO)),
|
||||||
(C_YELLOW, "Intervalo entre sessões", f"{INTERVALO_ENTRE_SESSOES}s"),
|
(C_YELLOW, "Intervalo entre sessões", f"{INTERVALO_ENTRE_SESSOES}s"),
|
||||||
|
(C_CYAN, "Clique de espera entre sessões", f"{INTERVALO_CLIQUE_ESPERA}s"),
|
||||||
(C_MAG, "Máximo de falhas", str(MAXIMO_FALHAS)),
|
(C_MAG, "Máximo de falhas", str(MAXIMO_FALHAS)),
|
||||||
(C_WHITE, "Horário de funcionamento", f"{HORA_INICIO} às {HORA_FIM}"),
|
(C_WHITE, "Horário de funcionamento", f"{HORA_INICIO} às {HORA_FIM}"),
|
||||||
(C_GRAY, "Confiança mínima", str(CONFIANCA)),
|
(C_GRAY, "Confiança mínima", str(CONFIANCA)),
|
||||||
@@ -281,7 +283,31 @@ def main() -> None:
|
|||||||
f"Aguardando {INTERVALO_ENTRE_SESSOES}s até a Sessão {numero_sessao}...",
|
f"Aguardando {INTERVALO_ENTRE_SESSOES}s até a Sessão {numero_sessao}...",
|
||||||
C_YELLOW,
|
C_YELLOW,
|
||||||
)
|
)
|
||||||
time.sleep(INTERVALO_ENTRE_SESSOES)
|
tempo_restante = INTERVALO_ENTRE_SESSOES
|
||||||
|
while tempo_restante > 0:
|
||||||
|
tempo_ate_clique = min(tempo_restante, INTERVALO_CLIQUE_ESPERA)
|
||||||
|
log(
|
||||||
|
f"[Espera] Dormindo {tempo_ate_clique}s (restam {tempo_restante}s)...",
|
||||||
|
C_GRAY,
|
||||||
|
)
|
||||||
|
time.sleep(tempo_ate_clique)
|
||||||
|
tempo_restante -= tempo_ate_clique
|
||||||
|
if tempo_restante <= 0:
|
||||||
|
break
|
||||||
|
log(
|
||||||
|
f"[Espera] Executando clique de keep-alive (restam {tempo_restante}s)...",
|
||||||
|
C_CYAN,
|
||||||
|
)
|
||||||
|
pos_espera = encontrar_botao(IMAGEM_BOTAO, CONFIANCA)
|
||||||
|
if pos_espera:
|
||||||
|
px, py = pos_espera
|
||||||
|
log(
|
||||||
|
f"[Espera] Clicando em ({px}, {py})...",
|
||||||
|
C_GREEN,
|
||||||
|
)
|
||||||
|
pyautogui.click(px, py)
|
||||||
|
else:
|
||||||
|
log("[Espera] Botão não encontrado no clique de keep-alive.", C_RED)
|
||||||
primeiro_clique = True
|
primeiro_clique = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user