This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium.webdriver import Firefox | |
from time import sleep | |
from urllib.parse import urlparse, parse_qsl | |
from selenium.webdriver.support.events import ( | |
AbstractEventListener, EventFiringWebDriver | |
) | |
import json | |
class Escuta(AbstractEventListener): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium.webdriver import Firefox | |
from urllib.parse import urlparse | |
from time import sleep | |
def find_by_text(browser, tag, text): | |
"""Encontrar o elemento com o texto `text`. | |
Argumentos: | |
- browser = Instancia do browser [firefox, chrome, ...] | |
- texto = conteúdo que deve estar na tag | |
- tag = tag onde o texto será procurado |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint | |
lista_original = [25, 22, 17, 17, 18, 18, 16, 27, 24, 24, 19, 20, 28, 28, 23, 26, 30, 29, 31, 21] | |
nova_lista=[] | |
for tripla in zip(lista_original[:-1],lista_original[1:],lista_original[2:]): | |
if len(tripla) == len(set(tripla)): | |
if len(nova_lista)>0: | |
if nova_lista[-1][-1]!=tripla[0]: | |
nova_lista.append(tripla) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StColors(object): | |
orange = '#f5be2e' | |
bright_green = '#b7f731' | |
dark_grey = '#191919' | |
mid_grey = '#323232' | |
light_grey = '#c8c8c8' | |
def create_widgets(self, master): | |
style = Style() |