Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Scraping Sportsbook Websites
#3
Ok, I have gotten a long way in the past 24 hours thanks to YouTube. I am stuck trying to find a solution to my current issue. I am trying to find text after certain text in the HTML file. Not particularly after a tag because these websites populate the same way for every game. so for example, the tag I first search is <span class="KambiBC-mod-outcome__odds">. But that is the same for every bet that they have on a particular game. Using find_all and len() there are anywhere from 120 to 150 instances. The first two are important to me, but the other two that I need will be a variable amount further away. I am hoping to truncate the string into two sections or just remove the first part after I extracted my data and then move onto the second part. Split doesn't seem to work with the large string that I have. I am looking for all HTML after the world "Halftime" because once again I would find the first two elements using find_all. Or if there is any other solution that you can think of. To visualize code because my explanation isn't the clearest:

Sugarhouse_Line = Sugarhouse.find_all(class_='KambiBC-mod-outcome__odds')
Sugarhouse_Line items 0 and 1 are vital to me, the other parts are somewhere between 60 and 80 but change every game and will change throughout the game, the only other constant that I can find would be anything after the word Halftime, so I would either want to truncate to remove everything before the word Halftime or do a find_all after the word Halftime.
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,756 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,221 Oct-20-2020, 09:56 AM
Last Post: Larz60+
  Can urlopen be blocked by websites? peterjv26 2 3,540 Jul-26-2020, 06:45 PM
Last Post: peterjv26
  Python program to write into websites for you pythonDEV333 3 2,643 Jun-08-2020, 12:06 PM
Last Post: pythonDEV333
  Scraping Websites to post on Telegram kobryan 1 2,773 Oct-19-2019, 07:03 AM
Last Post: metulburr
  Scraping Websites to post on Telegram kobryan 0 3,500 Oct-09-2019, 04:11 PM
Last Post: kobryan
  Scrapping .aspx websites boxingowl88 3 8,411 Oct-10-2018, 05:35 PM
Last Post: stranac
  Scrapper for websites stinger 0 2,444 Jul-20-2018, 02:11 AM
Last Post: stinger
  scraping javascript websites with selenium DoctorEvil 1 3,456 Jun-08-2018, 06:40 PM
Last Post: DoctorEvil
  Email extraction from websites stefanoste78 14 12,751 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