Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Scraping Sportsbook Websites
#11
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:

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 HTML
Error:

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
Reply


Messages In This Thread
Web Scraping Sportsbook Websites - by Khuber79 - Mar-23-2020, 03:33 PM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-23-2020, 04:48 PM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-25-2020, 05:28 AM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-25-2020, 06:39 AM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-25-2020, 08:20 AM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-25-2020, 07:10 PM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-25-2020, 07:25 PM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-25-2020, 07:27 PM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-25-2020, 08:51 PM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-26-2020, 03:44 AM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-27-2020, 07:30 PM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-27-2020, 12:24 AM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-27-2020, 05:16 AM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-27-2020, 09:18 AM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-27-2020, 05:09 PM
RE: Web Scraping Sportsbook Websites - by Larz60+ - Mar-27-2020, 09:21 PM
RE: Web Scraping Sportsbook Websites - by Khuber79 - Mar-30-2020, 11:21 PM
RE: Web Scraping Sportsbook Websites - by Whitesox1 - Mar-17-2021, 12:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Webscrapping sport betting websites KoinKoin 3 5,491 Nov-08-2023, 03:00 PM
Last Post: LoriBrown
Thumbs Up Issue facing while scraping the data from different websites in single script. Balamani 1 2,139 Oct-20-2020, 09:56 AM
Last Post: Larz60+
  Can urlopen be blocked by websites? peterjv26 2 3,414 Jul-26-2020, 06:45 PM
Last Post: peterjv26
  Python program to write into websites for you pythonDEV333 3 2,537 Jun-08-2020, 12:06 PM
Last Post: pythonDEV333
  Scraping Websites to post on Telegram kobryan 1 2,666 Oct-19-2019, 07:03 AM
Last Post: metulburr
  Scraping Websites to post on Telegram kobryan 0 3,439 Oct-09-2019, 04:11 PM
Last Post: kobryan
  Scrapping .aspx websites boxingowl88 3 8,275 Oct-10-2018, 05:35 PM
Last Post: stranac
  Scrapper for websites stinger 0 2,383 Jul-20-2018, 02:11 AM
Last Post: stinger
  scraping javascript websites with selenium DoctorEvil 1 3,390 Jun-08-2018, 06:40 PM
Last Post: DoctorEvil
  Email extraction from websites stefanoste78 14 12,186 Aug-18-2017, 09:44 PM
Last Post: stefanoste78

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020