Oh so then I would not need to send click commands? It would automatically expand all JavaScript on the page? That would help a lot since I could see a ton of bugs with sending click commands.
I tried by getting an error, not sure I am implementing it correctly:
I tried by getting an error, not sure I am implementing it correctly:
import requests import csv from bs4 import BeautifulSoup import urllib.request import random import re from selenium import webdriver import time chrome_path = r"C:\Users\user\Desktop\chromedriver.exe" Urls = [] Teams = '' with open('M:\SportsBooks3.csv') as csvfile: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: Urls.append(row) FD_web = webdriver.Chrome(chrome_path) FD_web.get(str(Urls[2])[2:-2]) # MapURL Test FD_web.get(FD_web.mapurl) time.sleep(2) source = FD_web.page_source soup = BeautifulSoup(source, 'lxml') print(soup) # Soup should be all expanded HTMLError:
Error:C:\Users\user\PycharmProjects\untitled\venv\Scripts\python.exe C:/Users/user/PycharmProjects/untitled/Test_MapURL.py
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/untitled/Test_MapURL.py", line 25, in <module>
FD_web.get(FD_web.mapurl)
AttributeError: 'WebDriver' object has no attribute 'mapurl'
Process finished with exit code 1