Skip to content

Instantly share code, notes, and snippets.

View pablohfreitas's full-sized avatar

pablohfreitas

View GitHub Profile
@pablohfreitas
pablohfreitas / PLScrap_imports.py
Created March 31, 2021 15:06
PLScrap_imports
import selenium
import time
import pandas as pd
import numpy as np
from time import sleep
from selenium import webdriver as wb
from tqdm import tqdm
import warnings
from warnings import simplefilter
@pablohfreitas
pablohfreitas / PLScrap_import_links.py
Created April 1, 2021 17:17
PLScrap_import_links.py
@pablohfreitas
pablohfreitas / PLScrap_init_webdriver.py
Created April 1, 2021 17:32
PLScrap_init_webdriver.py
#Website link
wd = wb.Chrome(executable_path=r'C:/Users/Pablo Henrique/chromedriver.exe')
wd.get('https://www.premierleague.com/')
@pablohfreitas
pablohfreitas / PLScrap_scraping_matches.py
Last active April 1, 2021 18:14
PLScrap_scraping_matches.py
# Cria uma lista com os links de cada partida
list_mlinks = mlinks['link_match']
# Cria dois objetos vazios, onde armazenaremos os resultados obtidos
data_matches = []
data_h2h = []
# Inicia o loop para percorrer todos os links
for link in tqdm(list_mlinks):
wd.get(link) #acessa o link da partida