diff --git "a/BBB20/captchas/Bot\303\243o.png" "b/BBB20/captchas/Bot\303\243o.png" index 37344f3..16b5245 100644 Binary files "a/BBB20/captchas/Bot\303\243o.png" and "b/BBB20/captchas/Bot\303\243o.png" differ diff --git a/BBB20/captchas/Cabelo.png b/BBB20/captchas/Cabelo.png new file mode 100644 index 0000000..983daa8 Binary files /dev/null and b/BBB20/captchas/Cabelo.png differ diff --git a/BBB20/captchas/Churrasqueira.png b/BBB20/captchas/Churrasqueira.png index 05686cb..ebcf4d7 100644 Binary files a/BBB20/captchas/Churrasqueira.png and b/BBB20/captchas/Churrasqueira.png differ diff --git a/BBB20/captchas/Faca.png b/BBB20/captchas/Faca.png index 2f06c82..63f0669 100644 Binary files a/BBB20/captchas/Faca.png and b/BBB20/captchas/Faca.png differ diff --git a/BBB20/captchas/Formiga.png b/BBB20/captchas/Formiga.png index e9e54b3..1181185 100644 Binary files a/BBB20/captchas/Formiga.png and b/BBB20/captchas/Formiga.png differ diff --git a/BBB20/captchas/Girafa.png b/BBB20/captchas/Girafa.png new file mode 100644 index 0000000..58c68f0 Binary files /dev/null and b/BBB20/captchas/Girafa.png differ diff --git a/BBB20/captchas/Mesa.png b/BBB20/captchas/Mesa.png index 4fa47ae..6542234 100644 Binary files a/BBB20/captchas/Mesa.png and b/BBB20/captchas/Mesa.png differ diff --git a/BBB20/captchas/Onda.png b/BBB20/captchas/Onda.png index 60ba624..4d3bfbc 100644 Binary files a/BBB20/captchas/Onda.png and b/BBB20/captchas/Onda.png differ diff --git "a/BBB20/captchas/Sof\303\241.png" "b/BBB20/captchas/Sof\303\241.png" index 285a019..b5dafd1 100644 Binary files "a/BBB20/captchas/Sof\303\241.png" and "b/BBB20/captchas/Sof\303\241.png" differ diff --git a/BBB20/captchas/ampulheta.png b/BBB20/captchas/ampulheta.png new file mode 100644 index 0000000..e58066f Binary files /dev/null and b/BBB20/captchas/ampulheta.png differ diff --git a/BBB20/captchas/anel.png b/BBB20/captchas/anel.png index 1e11070..054ad43 100644 Binary files a/BBB20/captchas/anel.png and b/BBB20/captchas/anel.png differ diff --git a/BBB20/captchas/baleia.png b/BBB20/captchas/baleia.png index fefd097..eefd407 100644 Binary files a/BBB20/captchas/baleia.png and b/BBB20/captchas/baleia.png differ diff --git a/BBB20/captchas/bolsa.png b/BBB20/captchas/bolsa.png index 8672392..ba2923c 100644 Binary files a/BBB20/captchas/bolsa.png and b/BBB20/captchas/bolsa.png differ diff --git a/BBB20/captchas/cadeira.png b/BBB20/captchas/cadeira.png index 4bffd7c..ac952e1 100644 Binary files a/BBB20/captchas/cadeira.png and b/BBB20/captchas/cadeira.png differ diff --git "a/BBB20/captchas/calend\303\241rio.png" "b/BBB20/captchas/calend\303\241rio.png" index 3487983..2bf37e5 100644 Binary files "a/BBB20/captchas/calend\303\241rio.png" and "b/BBB20/captchas/calend\303\241rio.png" differ diff --git "a/BBB20/captchas/carrinho de beb\303\252.png" "b/BBB20/captchas/carrinho de beb\303\252.png" index fa7eb95..52cea83 100644 Binary files "a/BBB20/captchas/carrinho de beb\303\252.png" and "b/BBB20/captchas/carrinho de beb\303\252.png" differ diff --git "a/BBB20/captchas/cart\303\243o.png" "b/BBB20/captchas/cart\303\243o.png" index 56f31b7..b66ab4b 100644 Binary files "a/BBB20/captchas/cart\303\243o.png" and "b/BBB20/captchas/cart\303\243o.png" differ diff --git a/BBB20/captchas/escadas.png b/BBB20/captchas/escadas.png index 92e24f5..768d96d 100644 Binary files a/BBB20/captchas/escadas.png and b/BBB20/captchas/escadas.png differ diff --git a/BBB20/captchas/esquadro.png b/BBB20/captchas/esquadro.png index 0f62be3..255a3da 100644 Binary files a/BBB20/captchas/esquadro.png and b/BBB20/captchas/esquadro.png differ diff --git a/BBB20/captchas/ferramenta.png b/BBB20/captchas/ferramenta.png index 24bf743..70b3eb6 100644 Binary files a/BBB20/captchas/ferramenta.png and b/BBB20/captchas/ferramenta.png differ diff --git a/BBB20/captchas/fogo.png b/BBB20/captchas/fogo.png index 9529b72..7608543 100644 Binary files a/BBB20/captchas/fogo.png and b/BBB20/captchas/fogo.png differ diff --git a/BBB20/captchas/gota.png b/BBB20/captchas/gota.png index 3795417..57de38e 100644 Binary files a/BBB20/captchas/gota.png and b/BBB20/captchas/gota.png differ diff --git "a/BBB20/captchas/m\303\241scara.png" "b/BBB20/captchas/m\303\241scara.png" new file mode 100644 index 0000000..d098ebb Binary files /dev/null and "b/BBB20/captchas/m\303\241scara.png" differ diff --git a/BBB20/captchas/peteca.png b/BBB20/captchas/peteca.png index b7817f3..503b359 100644 Binary files a/BBB20/captchas/peteca.png and b/BBB20/captchas/peteca.png differ diff --git a/BBB20/captchas/pia.png b/BBB20/captchas/pia.png index 711afd0..f34ca69 100644 Binary files a/BBB20/captchas/pia.png and b/BBB20/captchas/pia.png differ diff --git "a/BBB20/captchas/po\303\247\303\243o.png" "b/BBB20/captchas/po\303\247\303\243o.png" index 7b3222a..b528557 100644 Binary files "a/BBB20/captchas/po\303\247\303\243o.png" and "b/BBB20/captchas/po\303\247\303\243o.png" differ diff --git "a/BBB20/captchas/pr\303\251dio.png" "b/BBB20/captchas/pr\303\251dio.png" index e221011..8da5584 100644 Binary files "a/BBB20/captchas/pr\303\251dio.png" and "b/BBB20/captchas/pr\303\251dio.png" differ diff --git "a/BBB20/captchas/rob\303\264.png" "b/BBB20/captchas/rob\303\264.png" index e9bb93c..104b4f6 100644 Binary files "a/BBB20/captchas/rob\303\264.png" and "b/BBB20/captchas/rob\303\264.png" differ diff --git "a/BBB20/captchas/sem\303\241foro.png" "b/BBB20/captchas/sem\303\241foro.png" index 8661c3d..0be3827 100644 Binary files "a/BBB20/captchas/sem\303\241foro.png" and "b/BBB20/captchas/sem\303\241foro.png" differ diff --git a/BBB20/elementsCaptcha/anel.png b/BBB20/elementsCaptcha/anel.png new file mode 100644 index 0000000..9b1dae3 Binary files /dev/null and b/BBB20/elementsCaptcha/anel.png differ diff --git a/BBB20/elementsCaptcha/peteca.png b/BBB20/elementsCaptcha/peteca.png new file mode 100644 index 0000000..5c80b1e Binary files /dev/null and b/BBB20/elementsCaptcha/peteca.png differ diff --git "a/BBB20/matchCaptcha/Bot\303\243o.png" "b/BBB20/matchCaptcha/Bot\303\243o.png" index c8edf6f..ff85d4e 100644 Binary files "a/BBB20/matchCaptcha/Bot\303\243o.png" and "b/BBB20/matchCaptcha/Bot\303\243o.png" differ diff --git a/BBB20/matchCaptcha/Cabelo.png b/BBB20/matchCaptcha/Cabelo.png new file mode 100644 index 0000000..dd9caef Binary files /dev/null and b/BBB20/matchCaptcha/Cabelo.png differ diff --git a/BBB20/matchCaptcha/Cadeira.png b/BBB20/matchCaptcha/Cadeira.png index cd2affb..c0edd59 100644 Binary files a/BBB20/matchCaptcha/Cadeira.png and b/BBB20/matchCaptcha/Cadeira.png differ diff --git a/BBB20/matchCaptcha/Churrasqueira.png b/BBB20/matchCaptcha/Churrasqueira.png index d72489d..b1a3740 100644 Binary files a/BBB20/matchCaptcha/Churrasqueira.png and b/BBB20/matchCaptcha/Churrasqueira.png differ diff --git a/BBB20/matchCaptcha/Faca.png b/BBB20/matchCaptcha/Faca.png index fbb65b3..1790fda 100644 Binary files a/BBB20/matchCaptcha/Faca.png and b/BBB20/matchCaptcha/Faca.png differ diff --git a/BBB20/matchCaptcha/Formiga.png b/BBB20/matchCaptcha/Formiga.png index 60987ac..f2560aa 100644 Binary files a/BBB20/matchCaptcha/Formiga.png and b/BBB20/matchCaptcha/Formiga.png differ diff --git a/BBB20/matchCaptcha/Girafa.png b/BBB20/matchCaptcha/Girafa.png new file mode 100644 index 0000000..c948b43 Binary files /dev/null and b/BBB20/matchCaptcha/Girafa.png differ diff --git a/BBB20/matchCaptcha/Mesa.png b/BBB20/matchCaptcha/Mesa.png index 920fb3c..9fb92d1 100644 Binary files a/BBB20/matchCaptcha/Mesa.png and b/BBB20/matchCaptcha/Mesa.png differ diff --git a/BBB20/matchCaptcha/Onda.png b/BBB20/matchCaptcha/Onda.png index db453d8..1c1761c 100644 Binary files a/BBB20/matchCaptcha/Onda.png and b/BBB20/matchCaptcha/Onda.png differ diff --git "a/BBB20/matchCaptcha/Sof\303\241.png" "b/BBB20/matchCaptcha/Sof\303\241.png" index 4c2f43f..d324399 100644 Binary files "a/BBB20/matchCaptcha/Sof\303\241.png" and "b/BBB20/matchCaptcha/Sof\303\241.png" differ diff --git a/BBB20/matchCaptcha/ampulheta.png b/BBB20/matchCaptcha/ampulheta.png new file mode 100644 index 0000000..8b74a27 Binary files /dev/null and b/BBB20/matchCaptcha/ampulheta.png differ diff --git a/BBB20/matchCaptcha/anel.png b/BBB20/matchCaptcha/anel.png index dab776e..a6236e5 100644 Binary files a/BBB20/matchCaptcha/anel.png and b/BBB20/matchCaptcha/anel.png differ diff --git a/BBB20/matchCaptcha/baleia.png b/BBB20/matchCaptcha/baleia.png index 2ce7f26..3ebd130 100644 Binary files a/BBB20/matchCaptcha/baleia.png and b/BBB20/matchCaptcha/baleia.png differ diff --git a/BBB20/matchCaptcha/bolsa.png b/BBB20/matchCaptcha/bolsa.png index 4903e59..2fa0f88 100644 Binary files a/BBB20/matchCaptcha/bolsa.png and b/BBB20/matchCaptcha/bolsa.png differ diff --git "a/BBB20/matchCaptcha/calend\303\241rio.png" "b/BBB20/matchCaptcha/calend\303\241rio.png" index 9b689ab..1335f18 100644 Binary files "a/BBB20/matchCaptcha/calend\303\241rio.png" and "b/BBB20/matchCaptcha/calend\303\241rio.png" differ diff --git "a/BBB20/matchCaptcha/carrinho de beb\303\252.png" "b/BBB20/matchCaptcha/carrinho de beb\303\252.png" index 292d2ad..977a602 100644 Binary files "a/BBB20/matchCaptcha/carrinho de beb\303\252.png" and "b/BBB20/matchCaptcha/carrinho de beb\303\252.png" differ diff --git "a/BBB20/matchCaptcha/cart\303\243o.png" "b/BBB20/matchCaptcha/cart\303\243o.png" index e531728..a63fae3 100644 Binary files "a/BBB20/matchCaptcha/cart\303\243o.png" and "b/BBB20/matchCaptcha/cart\303\243o.png" differ diff --git a/BBB20/matchCaptcha/escadas.png b/BBB20/matchCaptcha/escadas.png index 1ac8451..c8c5bcb 100644 Binary files a/BBB20/matchCaptcha/escadas.png and b/BBB20/matchCaptcha/escadas.png differ diff --git a/BBB20/matchCaptcha/esquadro.png b/BBB20/matchCaptcha/esquadro.png index 193b631..cffb71a 100644 Binary files a/BBB20/matchCaptcha/esquadro.png and b/BBB20/matchCaptcha/esquadro.png differ diff --git a/BBB20/matchCaptcha/ferramenta.png b/BBB20/matchCaptcha/ferramenta.png index 50bac67..5d383df 100644 Binary files a/BBB20/matchCaptcha/ferramenta.png and b/BBB20/matchCaptcha/ferramenta.png differ diff --git a/BBB20/matchCaptcha/fogo.png b/BBB20/matchCaptcha/fogo.png index fe6c6ef..1a9e563 100644 Binary files a/BBB20/matchCaptcha/fogo.png and b/BBB20/matchCaptcha/fogo.png differ diff --git a/BBB20/matchCaptcha/gota.png b/BBB20/matchCaptcha/gota.png index d2cdf2d..3dd3228 100644 Binary files a/BBB20/matchCaptcha/gota.png and b/BBB20/matchCaptcha/gota.png differ diff --git "a/BBB20/matchCaptcha/m\303\241scara.png" "b/BBB20/matchCaptcha/m\303\241scara.png" new file mode 100644 index 0000000..b62a401 Binary files /dev/null and "b/BBB20/matchCaptcha/m\303\241scara.png" differ diff --git a/BBB20/matchCaptcha/peteca.png b/BBB20/matchCaptcha/peteca.png new file mode 100644 index 0000000..75ac7b3 Binary files /dev/null and b/BBB20/matchCaptcha/peteca.png differ diff --git a/BBB20/matchCaptcha/pia.png b/BBB20/matchCaptcha/pia.png index e5d7b4c..ca0e8e6 100644 Binary files a/BBB20/matchCaptcha/pia.png and b/BBB20/matchCaptcha/pia.png differ diff --git "a/BBB20/matchCaptcha/po\303\247\303\243o.png" "b/BBB20/matchCaptcha/po\303\247\303\243o.png" index c77b578..ad10653 100644 Binary files "a/BBB20/matchCaptcha/po\303\247\303\243o.png" and "b/BBB20/matchCaptcha/po\303\247\303\243o.png" differ diff --git "a/BBB20/matchCaptcha/pr\303\251dio.png" "b/BBB20/matchCaptcha/pr\303\251dio.png" index 328cd5b..7e92e43 100644 Binary files "a/BBB20/matchCaptcha/pr\303\251dio.png" and "b/BBB20/matchCaptcha/pr\303\251dio.png" differ diff --git "a/BBB20/matchCaptcha/rob\303\264.png" "b/BBB20/matchCaptcha/rob\303\264.png" index da96e62..fdc06ba 100644 Binary files "a/BBB20/matchCaptcha/rob\303\264.png" and "b/BBB20/matchCaptcha/rob\303\264.png" differ diff --git "a/BBB20/matchCaptcha/sem\303\241foro.png" "b/BBB20/matchCaptcha/sem\303\241foro.png" index 3374f5a..ac4d025 100644 Binary files "a/BBB20/matchCaptcha/sem\303\241foro.png" and "b/BBB20/matchCaptcha/sem\303\241foro.png" differ diff --git "a/BBB20/processedCaptchas/Bot\303\243o.png" "b/BBB20/processedCaptchas/Bot\303\243o.png" index 94c002a..2a7169b 100644 Binary files "a/BBB20/processedCaptchas/Bot\303\243o.png" and "b/BBB20/processedCaptchas/Bot\303\243o.png" differ diff --git a/BBB20/processedCaptchas/Cabelo.png b/BBB20/processedCaptchas/Cabelo.png new file mode 100644 index 0000000..c267ec6 Binary files /dev/null and b/BBB20/processedCaptchas/Cabelo.png differ diff --git a/BBB20/processedCaptchas/Cadeira.png b/BBB20/processedCaptchas/Cadeira.png index 2c70158..5eab354 100644 Binary files a/BBB20/processedCaptchas/Cadeira.png and b/BBB20/processedCaptchas/Cadeira.png differ diff --git a/BBB20/processedCaptchas/Churrasqueira.png b/BBB20/processedCaptchas/Churrasqueira.png index 9229e74..8a415b6 100644 Binary files a/BBB20/processedCaptchas/Churrasqueira.png and b/BBB20/processedCaptchas/Churrasqueira.png differ diff --git a/BBB20/processedCaptchas/Faca.png b/BBB20/processedCaptchas/Faca.png index 279cbc5..5a7ca22 100644 Binary files a/BBB20/processedCaptchas/Faca.png and b/BBB20/processedCaptchas/Faca.png differ diff --git a/BBB20/processedCaptchas/Formiga.png b/BBB20/processedCaptchas/Formiga.png index f0715ec..34b5b7f 100644 Binary files a/BBB20/processedCaptchas/Formiga.png and b/BBB20/processedCaptchas/Formiga.png differ diff --git a/BBB20/processedCaptchas/Girafa.png b/BBB20/processedCaptchas/Girafa.png new file mode 100644 index 0000000..4fe764d Binary files /dev/null and b/BBB20/processedCaptchas/Girafa.png differ diff --git a/BBB20/processedCaptchas/Mesa.png b/BBB20/processedCaptchas/Mesa.png index ddb155b..2073883 100644 Binary files a/BBB20/processedCaptchas/Mesa.png and b/BBB20/processedCaptchas/Mesa.png differ diff --git a/BBB20/processedCaptchas/Onda.png b/BBB20/processedCaptchas/Onda.png index 0ec7780..781b075 100644 Binary files a/BBB20/processedCaptchas/Onda.png and b/BBB20/processedCaptchas/Onda.png differ diff --git "a/BBB20/processedCaptchas/Sof\303\241.png" "b/BBB20/processedCaptchas/Sof\303\241.png" index acc0b25..8ee4289 100644 Binary files "a/BBB20/processedCaptchas/Sof\303\241.png" and "b/BBB20/processedCaptchas/Sof\303\241.png" differ diff --git a/BBB20/processedCaptchas/ampulheta.png b/BBB20/processedCaptchas/ampulheta.png new file mode 100644 index 0000000..78ba65f Binary files /dev/null and b/BBB20/processedCaptchas/ampulheta.png differ diff --git a/BBB20/processedCaptchas/anel.png b/BBB20/processedCaptchas/anel.png index a7b64ba..e597740 100644 Binary files a/BBB20/processedCaptchas/anel.png and b/BBB20/processedCaptchas/anel.png differ diff --git a/BBB20/processedCaptchas/baleia.png b/BBB20/processedCaptchas/baleia.png index cc29423..a012b38 100644 Binary files a/BBB20/processedCaptchas/baleia.png and b/BBB20/processedCaptchas/baleia.png differ diff --git a/BBB20/processedCaptchas/bolsa.png b/BBB20/processedCaptchas/bolsa.png index b819a90..c72a5ac 100644 Binary files a/BBB20/processedCaptchas/bolsa.png and b/BBB20/processedCaptchas/bolsa.png differ diff --git "a/BBB20/processedCaptchas/calend\303\241rio.png" "b/BBB20/processedCaptchas/calend\303\241rio.png" index 76ed48a..c2803df 100644 Binary files "a/BBB20/processedCaptchas/calend\303\241rio.png" and "b/BBB20/processedCaptchas/calend\303\241rio.png" differ diff --git "a/BBB20/processedCaptchas/carrinho de beb\303\252.png" "b/BBB20/processedCaptchas/carrinho de beb\303\252.png" index 346df0f..73c89d8 100644 Binary files "a/BBB20/processedCaptchas/carrinho de beb\303\252.png" and "b/BBB20/processedCaptchas/carrinho de beb\303\252.png" differ diff --git "a/BBB20/processedCaptchas/cart\303\243o.png" "b/BBB20/processedCaptchas/cart\303\243o.png" index b2069ed..eea34cb 100644 Binary files "a/BBB20/processedCaptchas/cart\303\243o.png" and "b/BBB20/processedCaptchas/cart\303\243o.png" differ diff --git a/BBB20/processedCaptchas/escadas.png b/BBB20/processedCaptchas/escadas.png index ef080b9..e5106e3 100644 Binary files a/BBB20/processedCaptchas/escadas.png and b/BBB20/processedCaptchas/escadas.png differ diff --git a/BBB20/processedCaptchas/esquadro.png b/BBB20/processedCaptchas/esquadro.png index d81a692..e9a2354 100644 Binary files a/BBB20/processedCaptchas/esquadro.png and b/BBB20/processedCaptchas/esquadro.png differ diff --git a/BBB20/processedCaptchas/ferramenta.png b/BBB20/processedCaptchas/ferramenta.png index 8d0b4a2..5f861b5 100644 Binary files a/BBB20/processedCaptchas/ferramenta.png and b/BBB20/processedCaptchas/ferramenta.png differ diff --git a/BBB20/processedCaptchas/fogo.png b/BBB20/processedCaptchas/fogo.png index 30ce794..a76adee 100644 Binary files a/BBB20/processedCaptchas/fogo.png and b/BBB20/processedCaptchas/fogo.png differ diff --git a/BBB20/processedCaptchas/gota.png b/BBB20/processedCaptchas/gota.png index ac206b3..0d8a6da 100644 Binary files a/BBB20/processedCaptchas/gota.png and b/BBB20/processedCaptchas/gota.png differ diff --git "a/BBB20/processedCaptchas/m\303\241scara.png" "b/BBB20/processedCaptchas/m\303\241scara.png" new file mode 100644 index 0000000..f121b41 Binary files /dev/null and "b/BBB20/processedCaptchas/m\303\241scara.png" differ diff --git a/BBB20/processedCaptchas/peteca.png b/BBB20/processedCaptchas/peteca.png new file mode 100644 index 0000000..5c80b1e Binary files /dev/null and b/BBB20/processedCaptchas/peteca.png differ diff --git a/BBB20/processedCaptchas/pia.png b/BBB20/processedCaptchas/pia.png index 5716944..20848b7 100644 Binary files a/BBB20/processedCaptchas/pia.png and b/BBB20/processedCaptchas/pia.png differ diff --git "a/BBB20/processedCaptchas/po\303\247\303\243o.png" "b/BBB20/processedCaptchas/po\303\247\303\243o.png" index 7c73c68..8d6ab3c 100644 Binary files "a/BBB20/processedCaptchas/po\303\247\303\243o.png" and "b/BBB20/processedCaptchas/po\303\247\303\243o.png" differ diff --git "a/BBB20/processedCaptchas/pr\303\251dio.png" "b/BBB20/processedCaptchas/pr\303\251dio.png" index ad51f14..2f7257c 100644 Binary files "a/BBB20/processedCaptchas/pr\303\251dio.png" and "b/BBB20/processedCaptchas/pr\303\251dio.png" differ diff --git "a/BBB20/processedCaptchas/rob\303\264.png" "b/BBB20/processedCaptchas/rob\303\264.png" index 50a435f..58e9dba 100644 Binary files "a/BBB20/processedCaptchas/rob\303\264.png" and "b/BBB20/processedCaptchas/rob\303\264.png" differ diff --git "a/BBB20/processedCaptchas/sem\303\241foro.png" "b/BBB20/processedCaptchas/sem\303\241foro.png" index d289254..baa7593 100644 Binary files "a/BBB20/processedCaptchas/sem\303\241foro.png" and "b/BBB20/processedCaptchas/sem\303\241foro.png" differ diff --git a/Votation.py b/Votation.py new file mode 100644 index 0000000..e075cee --- /dev/null +++ b/Votation.py @@ -0,0 +1,223 @@ +from selenium import webdriver +from selenium.webdriver.common.action_chains import ActionChains +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities +import time +from binascii import a2b_base64 +import processing +from getpass import getpass + +class Votation: + def __init__(self, tipoParedao = 'triplo', buscarLinkParedaoAuto = True): + self.url = '' + self.__tipoParedao = tipoParedao + self.__paginaInicialGshow = "https://gshow.globo.com/realities/bbb/" + self.__loginUrl = "https://minhaconta.globo.com/" + self.__login = '' + self.__password = '' + self.__browser = None + self.__setBrowser() + self.__getLoginAcessGlobo() + + if buscarLinkParedaoAuto: + self.__getUrlVotationGshow() + + def __setBrowser(self): + try: + caps = DesiredCapabilities().CHROME.copy() + caps["pageLoadStrategy"] = "eager" # interactive + self.__browser = webdriver.Chrome(capabilities=caps) + + except: + caps = DesiredCapabilities().FIREFOX.copy() + caps["pageLoadStrategy"] = "eager" # interactive + self.__browser = webdriver.Firefox(capabilities=caps) + + + def __getLoginAcessGlobo(self): + self.__login = input("Digite seu email: ") + + print("Digite sua senha: ") + self.__password = getpass() + + self.__browser.get(self.__loginUrl) + + time.sleep(10) + print("fazendo o login") + + self.__browser.find_element_by_id('login').send_keys(self.__login) + self.__browser.find_element_by_id('password').send_keys(self.__password) + self.__browser.find_elements_by_css_selector('#login-form .button')[0].click() + + print("login finalizado") + time.sleep(5) + + def __getNamesBigWall(self, titleParts): + namesAux = titleParts.split(', ') + names = [namesAux[0].strip()] + names = names + namesAux[1].split(' ou ') + + return names + + def __votationDoubleBigWall(self, titleParts): + names = self.__getNamesBigWall(titleParts) + + option = input("Quem você quer eliminar?: \n 1. " + names[0] + "\n 2. " + names[1] + "\nDigite o número da pessoa: ") + while not option in ["1", "2"]: + option = input("Quem você quer eliminar?: \n 1. " + names[0] + "\n 2. " + names[1] + "\nDigite o número da pessoa: ") + + nameSearch = names[int(option)-1] + idxName = names.index(nameSearch) + + return idxName; + + def __votationTrippleBigWall(self, titleParts): + names = self.__getNamesBigWall(titleParts) + + option = input("Quem você quer eliminar?: \n 1. " + names[0] + "\n 2. " + names[1] + "\n 3. " + names[2] + "\nDigite o número da pessoa: ") + while not option in ["1", "2", "3"]: + option = input("Quem você quer eliminar?: \n 1. " + names[0] + "\n 2. " + names[1] + "\n 3. " + names[2] + "\nDigite o número da pessoa: ") + + + nameSearch = names[int(option)-1] + idxName = names.index(nameSearch) + + return idxName; + + def __executeVotation(self, idxName): + totalVotes = 0 + + while True: + element = [] + while(1): + try: + element = [ + self.__browser.find_element_by_xpath('/html/body/div[2]/div[4]/div/div[1]/div[4]/div[1]'), + self.__browser.find_element_by_xpath('/html/body/div[2]/div[4]/div/div[1]/div[4]/div[2]'), + self.__browser.find_element_by_xpath('/html/body/div[2]/div[4]/div/div[1]/div[4]/div[3]'), + ] + break + except: + pass + + elementBtn = element[idxName] + + # scroll down + self.__browser.execute_script("window.scrollTo(0, 800)") + + ac2 = ActionChains(self.__browser) + ac2.move_to_element(elementBtn).click().perform() + time.sleep(3) + + outSideLoop = True + innerLoop = True + + while outSideLoop: + ac = ActionChains(self.__browser) + captchaBox = [] + + vote_succeeded = False + + while innerLoop: + try: + captchaBox = self.__browser.find_elements_by_class_name('gc__2Qtwp') + if captchaBox != []: + if len(captchaBox[0].text) > 2: + break + + time.sleep(1) + + value = self.__browser.find_element_by_xpath('/html/body/div[2]/div[4]/div/div[3]/div/div/div[1]/div[2]/button') + if value.text != '': + vote_succeeded = True + outSideLoop = False + innerLoop = False + break + except: + pass + + if vote_succeeded: + totalVotes += 1 + print(totalVotes, 'votos com sucesso') + break + + imageSearchName = captchaBox[0].text.split('\n')[-1] + print("\nProcurando por: " + imageSearchName) + + captcha = [] + while(1): + try: + captcha = self.__browser.find_elements_by_class_name('gc__3_EfD')[0] + break + except: + pass + + captchaSrc = captcha.get_attribute("src") + + data = captchaSrc.split(';base64,')[1] + binary_data = a2b_base64(data) + + filename = imageSearchName + '.png' + + fd = open('BBB20/captchas/' + filename, 'wb') + fd.write(binary_data) + fd.close() + + processing.processImage(filename) + points = processing.findInCaptcha(filename) + + + if points != []: + posX = points[0] - captcha.size['width']/2 + posY = points[1] - captcha.size['height']/2 + + ac.move_to_element(captcha).move_by_offset(posX, posY).click().perform() + time.sleep(3) + else: + print("\nErro: Captcha não encontrado") + + time.sleep(1) + + self.__browser.refresh() + time.sleep(1) + + def __getUrlVotationGshow(self): + print("Buscando paredão atual") + self.__browser.get(self.__paginaInicialGshow) + + time.sleep(10) + element = self.__browser.find_elements_by_css_selector('.bstn-hl-link')[0] + link = element.get_attribute('href') + print("Paredão atual encontrado") + print(link) + self.setUrl(link) + + def setUrl(self, url): + self.url = url + return self + + def initVotation(self): + self.__browser.get(self.url) + print("\nIniciando o bot de votações") + + while(1): + try: + title = self.__browser.find_element_by_xpath('/html/body/div[2]/div[4]/div/div[1]/div[3]/div/div/div').text + + break + except: + pass + + print(title) + + time.sleep(5) + + titleParts = title.split('?')[1] + + print(titleParts) + + if self.__tipoParedao == 'triplo': + idxName = self.__votationTrippleBigWall(titleParts) + else: + idxName = self.__votationDoubleBigWall(titleParts) + + self.__executeVotation(idxName) \ No newline at end of file diff --git a/geckodriver.log b/geckodriver.log index d39a60d..1659d4a 100644 --- a/geckodriver.log +++ b/geckodriver.log @@ -13485,3 +13485,2282 @@ action.dispatchTickActions@chrome://marionette/content/action.js:1060:35 action.dispatch/chainEvents<@chrome://marionette/content/action.js:1028:20 JavaScript error: https://eus.rubiconproject.com/usync.html, line 12: SecurityError: The operation is insecure. Exiting due to channel error. +1586018316022 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bt/fsxrq8y90s728fjz2j0f2d1m0000gn/T/rust_mozprofileoBrUOd" +1586018317391 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus +1586018317946 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons +1586018317947 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry +1586018317947 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/ +1586018317947 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader* +1586018321874 Marionette INFO Listening on port 50303 +1586018322169 Marionette WARN TLS certificate errors will be ignored for this session +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1586018352073 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bt/fsxrq8y90s728fjz2j0f2d1m0000gn/T/rust_mozprofileJTqR42" +1586018353739 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus +1586018354841 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons +1586018354841 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry +1586018354842 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/ +1586018354842 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader* +1586018359067 Marionette INFO Listening on port 50403 +1586018359133 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://tags.tiqcdn.com/utag/globo/globoid/prod/utag.3.js?utv=ut4.44.202002211844, line 25: TypeError: b.status_user is undefined +1586018420112 Marionette INFO Stopped listening on port 50403 +1586018469176 mozrunner::runner INFO Running command: "/Applications/Firefox.app/Contents/MacOS/firefox-bin" "-marionette" "-foreground" "-no-remote" "-profile" "/var/folders/bt/fsxrq8y90s728fjz2j0f2d1m0000gn/T/rust_mozprofilelqOwlE" +1586018470019 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus +1586018470507 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons +1586018470508 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry +1586018470508 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/ +1586018470508 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader* +1586018473145 Marionette INFO Listening on port 50609 +1586018473179 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://tags.tiqcdn.com/utag/globo/globoid/prod/utag.3.js?utv=ut4.44.202002211844, line 25: TypeError: b.status_user is undefined +IPDL protocol error: Handler returned error code! + +###!!! [Parent][DispatchAsyncMessage] Error: PMessagePort::Msg_PostMessages Processing error: message was deserialized, but the handler returned false (indicating failure) + +1586018515593 Marionette WARN TimedPromise timed out after 0 ms: stacktrace: +TimedPromise/<@chrome://marionette/content/sync.js:244:13 +TimedPromise@chrome://marionette/content/sync.js:229:10 +Sleep@chrome://marionette/content/sync.js:282:10 +dispatchPause@chrome://marionette/content/action.js:1482:10 +toEvents/<@chrome://marionette/content/action.js:1156:16 +action.dispatchTickActions@chrome://marionette/content/action.js:1060:35 +action.dispatch/chainEvents<@chrome://marionette/content/action.js:1028:20 +action.dispatch@chrome://marionette/content/action.js:1034:5 +performActions@chrome://marionette/content/listener.js:850:16 +dispatch/ 2: break - # vote_confirmation = browser.find_elements_by_class_name('_2uL8BLYO2wcSLbb32p6m8D') time.sleep(1) value = browser.find_element_by_xpath('/html/body/div[2]/div[4]/div/div[3]/div/div/div[1]/div[2]/button') @@ -143,21 +130,17 @@ print(totalVotes, 'votos com sucesso') break - # print("4") imageSearchName = captchaBox[0].text.split('\n')[-1] print("procurando por " + imageSearchName) captcha = [] while(1): try: - # print("procurando imagem") captcha = browser.find_elements_by_class_name('gc__3_EfD')[0] - # print("5") break except: pass - # print("6") captchaSrc = captcha.get_attribute("src") data = captchaSrc.split(';base64,')[1] @@ -172,12 +155,8 @@ processing.processImage(filename) points = processing.findInCaptcha(filename) - # print("6") if points != []: - # print("a imagem se encontra nos pontos: " + str(points[0]) + " X " + str(points[1])) - # print("o tamanho do captcha é " + str(captcha.size['width']) + " X " + str(captcha.size['height'])) - posX = points[0] - captcha.size['width']/2 posY = points[1] - captcha.size['height']/2 @@ -190,5 +169,3 @@ browser.refresh() time.sleep(1) - -# .quit()