usar beautifulsoup
#start
from bs4 import BeautifulSoup
import requests
req = requests.get('https://www.slickcharts.com/sp500')
soup = BeautifulSoup(req.text, 'html.parser')
instalación de python bs4
pip install bs4 #this'll do the work
beautifulsoup4 instalar
pip install beautifulsoup4
importación de python beautifulsoup
from bs4 import BeautifulSoup
import requests
bs4
#Selenium hands the page source to Beautiful Soup
soup_level1=BeautifulSoup(driver.page_source, 'lxml')
datalist = [] #empty list
x = 0 #counter
for link in soup_level1.find_all('a', id=re.compile("^MainContent_uxLevel2_JobTitles_uxJobTitleBtn_")):
##code to execute in for loop goes here