Bot by image recognition simulating (random) human clicks

Overview

bbbot22

bot por reconhecimento de imagem simulando cliques humanos (aleatórios)

inb4: sim, esse é basicamente o mesmo bot de 2021 porque a Globo não teve a pachorra de mudar o site de votação, só mudou umas coisinha (a cor de dois botões)

tl;dr: abre o site da Globo, entra na sua conta, abre a página do paredão, deixa o brother visível e liga o bot que ele se vira

Meio sem tempo irmão pro readme, mas você vai precisar de:

0 - um computador (que eu não posso te ajudar com isso) e python (que eu já te ajudei com isso, caso não tenha/não saiba cheque algum dos meus outros dois repositórios facebot ou bbbot que eu explico tudo)

1 - imagem do nome do brother, do botão do captcha (que tem que clicar em "sou humano" rs) e do votar novamente

Simples: tira print, corta esse pedaço, salva de qualquer forma vou incluir as minhas e a foto do brother, que é pra quem o bot está pronto pra votar (se quiser votar em outra pessoa, você que lute)

2 - o bot funciona por reconhecimento de imagem, então precisamos do pyautogui e do PIL (que só usei pra otimizar a abertura de imagem, não é vitalmente necessário, caso não queira usar é só rancar de lá)

$ pip install pyautogui pillow opencv-python

3 - ... infelizmente manter o browser aberto, já que qualquer tentativa de automação em segundo plano -> falhei

Ok, a treta toda é que não tem como abrir o site da Globo por algum browser automatizado tipo o selenium já que a header denuncia (você basicamente está com uma melância no pescoço escrito BOT) e qnd tenta votar o site prontamente chama o hCaptcha que começa a perguntar aquelas dezenas de "escolha imagem de um barco" que nem eu sei responder direito, quem dirá meu mero botzinho.

A solução

usar reconhecimento de imagem pra achar onde clicar e apertar os botões como se fosse uma pessoa.

A nova treta

como apontado pelo Pedrinho, a galera lá monitora onde e em quanto tempo você clica, então caso demore sempre o mesmo tanto de tempo e clica sempre no mesmo lugar, eles vão descobrir e chamar as imagens do hCaptcha só pra ~testar se tu não é um bot mesmo e pasmem nós somos (#SomosTodosBots)

A solução final

meti um monte de aleatoriedade tanto em onde ele vai clicar (tomando cuidado pra não ser fora da área clicável) tanto em COMO ele vai clicar (namoral, eu até coloquei pra ele escolher aleatoriamente na lista de funções disponíveis, cada vez), então o jeito e a duração do clique muda. Também inclui ele apertar um f5 pra atualizar a página sempre que der ruim (caso ele não encontre a imagem, começa de novo) e descobri que algumas vezes quando o hCaptcha é acionado, alguns refreshs podem confundir o captcha e ele não chama kkk

Otimização

Botei uns sleep aí no meio porque meu browser tava demorando pra abrir e dava problema, caso o seu seja mais rápido/lento é só ir tirando/diminuindo/aumentando o tempo dos sleep.

Problemas

vish... pode ter uns problemas hein, do tipo: a tela do seu PC pode ser dimensionalmente diferente da minha, então você vai precisar mapear melhor o tamanho dos botões e seus limites usando pyautogui.position(), mas esperamos que não chegue a isso. Sei lá, as imagens podem dar treta? Qualquer coisa tira print novo do seu PC aí e nomeia do mesmo jeito que tá os meus. Não força a barra em velocidade de clique que o site desconfia. Por fim, torce pro site não pedir captcha de imagem, se não já era, nesse caso espera um pouco/muda de browser, etc.

Owner
Yuri
Like to code, love python and making bots. Oh, and I also research Astrophysics
Yuri
This script is for photographers to do timeslice with one click.

One Click TimeSlice Tool What is this for This is for photographers who want to create TimeSlice pictures without installing PS plugins. Before using

Xi Zhao 13 Sep 23, 2022
Python pygame project that turns your images to matrix rain

Matrix-Rain-An-Image This project implements the classic Matrix digital rain effect in python with pygame to build up an image provided with multiple

7 Dec 11, 2022
Detecting haze image with hazer.

hazer-py Detecting haze image with hazer. What is hazer Hazer is a lib for getting "haze degree". This repository is python version of hazer: https://

Joey777210 2 Dec 27, 2021
A linear stairs generation add-on for Blender

Linear Stairs Generator Table of Contents Installation Usage Screenshots Important Notes Requirements Blender 3.0 or newer. Installation: Download a z

Elhanan Flesch 4 May 17, 2022
With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen

Oraxen-item-to-yml With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen How to use Install the

Akex 1 Dec 29, 2021
An API that renders HTML/CSS content to PNG using Chromium

html_png An API that renders HTML/CSS content to PNG using Chromium Disclaimer I am not responsible if you happen to make your own instance of this AP

10 Aug 08, 2022
Goddard Image Analysis and Navigation Tool

Copyright 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is clai

NASA 12 Dec 23, 2022
Generate different types of random avatars.

avatar-generator Generate different types of random avatars. Requirements Python3 pytorch=1.6 cv2=3.4 tqdm 1. Github-like avatars python generate_gi

Ming 11 Apr 02, 2022
A simple programming language for manipulating images.

f-stop A simple programming language for manipulating images. Examples OPEN "image.png" AS image RESIZE image (300, 300) SAVE image "out.jpg" CLOSE im

F-Stop 6 Oct 27, 2022
Small wrapper around 3dmol.js and html2canvas for creating self-contained HTML files that display a 3D molecular representation.

Description Small wrapper around 3dmol.js and html2canvas for creating self-contained HTML files that display a 3D molecular representation. Double cl

David Meijer 1 Dec 02, 2021
HTML2Image is a lightweight Python package that acts as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.

176 Jan 01, 2023
LabelMe annotation tool source code

LabelMe annotation tool source code Here you will find the source code to install the LabelMe annotation tool on your server. LabelMe is an annotation

MIT CSAIL Computer Vision 1.3k Jan 03, 2023
A simple programme for converting url into a qr code (.png file)

QrTk A simple lightweight programme for converting url into a qr code (.png file) Pre-Requisites Before installing the programme , you need to run the

Juss Patel 4 Nov 08, 2021
Tweet2Image - Convert tweets to Instagram-friendly images.

Convert tweets to Instagram-friendly images. How to use If you want to use this repository as a submodule, don't forget to put the fonts d

Janu Lingeswaran 1 Mar 11, 2022
A simple image to text converter with GUI!

TEXTEMAGE! Textemage is a quick tool that extracts text from images, it is a Python based GUI program(also available in executable version). This is a

Akascape 5 Oct 26, 2022
This is an app that allows users to upload photos and display and store the photos in a file until the user deletes them.

Qt Photo App This is an app that allows users to upload photos and display and store the photos in a file until the user deletes them. Setup python3 -

Kathy Yang 5 Jan 22, 2022
Extracts random colours from an image

EXTRACT COLOURS This repo contains all the project files. Project Description A Program that extracts 10 random colours from an image and saves the rg

David .K. Danso 3 Dec 13, 2021
Png-to-stl - Converts PNG and text to SVG, and then extrudes that based on parameters

have ansible installed locally run ansible-playbook setup_application.yml this sets up directories, installs system packages, and sets up python envir

1 Jan 03, 2022
Collection of SVG diagrams about how UTF-8 works

Diagrams Repository of diagrams made for articles on my blog. All diagrams are created using diagrams.net. UTF-8 Licenses Copyright 2022 Seth Michael

Seth Michael Larson 24 Aug 13, 2022
Python Interface of P3D

pyp3d 介绍: pyp3d是一个可在python上使用的工具包,它提供了一种可使用python脚本驱动创建模型的方法,为三维建模提供了全新的思路。 pyp3d中定义了一系列建模相关的必要的数据类型,例如球体、圆锥台、四棱锥台、 拉伸体、圆角管等几何体,pyp3d还提供了许多函数来实现放置集合体、

20 Sep 07, 2022