How to complete an ADVANCED Web Scrape of NBA player props?
up vote
-1
down vote
favorite
I would like to scrape the NBA player prop bets from https://www.bovada.lv. I named the question ADVANCED because there are multiple teams, players, and categories.
Here is the HTML code as requested:
https://pastebin.com/UkY071uV
Here is the link that will bring you directly to the basketball section: https://www.bovada.lv/sports/basketball.
To get started...
The NBA player props are located in the basketball section. If you click the arrow next to each game, or ">", it will take you to another betting page. If the player props have been released you can find them located near the bottom of the page in the Player Prop section (note: the props are released before the games start).
Here is a sample of the data of one player I am looking for:
Total Points - LeBron James (LAL)
28.5 -115 -115
I would like to scrape all of the players names, the category and the bet odds. Unfortunately I didn't make it too far. The methods I have learned so far have had no success.
#import modules
from bs4 import BeautifulSoup
import requests, os
from selenium import webdriver
#initiate Selenium
os.chdir('C:webdrivers')
#enter user agent
header = 'User-agent' : 'ENTER USER_AGENT HERE'
options = webdriver.ChromeOptions(); options.add_argument("--start-maximized")
driver = webdriver.Chrome(chrome_options=options)
driver.get('https://www.bovada.lv/sports/basketball/nba')
soup = BeautifulSoup(driver.page_source, 'html.parser')
driver.quit()
#attempt at printing soup
print(soup)
I can't locate any of the respective players in the code. I figured it couldn't hurt to reach out for some help. Perhaps someone with more experience knows how to do this or can help lead me in the right direction.
I am new to web scraping and very appreciative of any assistance that you may offer. Thanks in advance for your time!
javascript python selenium web-scraping beautifulsoup
|
show 2 more comments
up vote
-1
down vote
favorite
I would like to scrape the NBA player prop bets from https://www.bovada.lv. I named the question ADVANCED because there are multiple teams, players, and categories.
Here is the HTML code as requested:
https://pastebin.com/UkY071uV
Here is the link that will bring you directly to the basketball section: https://www.bovada.lv/sports/basketball.
To get started...
The NBA player props are located in the basketball section. If you click the arrow next to each game, or ">", it will take you to another betting page. If the player props have been released you can find them located near the bottom of the page in the Player Prop section (note: the props are released before the games start).
Here is a sample of the data of one player I am looking for:
Total Points - LeBron James (LAL)
28.5 -115 -115
I would like to scrape all of the players names, the category and the bet odds. Unfortunately I didn't make it too far. The methods I have learned so far have had no success.
#import modules
from bs4 import BeautifulSoup
import requests, os
from selenium import webdriver
#initiate Selenium
os.chdir('C:webdrivers')
#enter user agent
header = 'User-agent' : 'ENTER USER_AGENT HERE'
options = webdriver.ChromeOptions(); options.add_argument("--start-maximized")
driver = webdriver.Chrome(chrome_options=options)
driver.get('https://www.bovada.lv/sports/basketball/nba')
soup = BeautifulSoup(driver.page_source, 'html.parser')
driver.quit()
#attempt at printing soup
print(soup)
I can't locate any of the respective players in the code. I figured it couldn't hurt to reach out for some help. Perhaps someone with more experience knows how to do this or can help lead me in the right direction.
I am new to web scraping and very appreciative of any assistance that you may offer. Thanks in advance for your time!
javascript python selenium web-scraping beautifulsoup
1
I can't actually view as that site is not available here but are you saying you need to navigate to each of those pages made available by clicking in the basketball section and then on each prop page you need to scrape the info shown? Can you share initially the first page HTML using the snippet tool available via edit? Or it too long do a pastebin of the entire page HTML?
– QHarr
Nov 10 at 23:28
You can probably write something simple to grab the page links and then loop over them navigating to them (if using selenium) calling a custom function that extracts the required info returning a list and build a final dataframe from a list of lists. Assuming all items are present on each page. Starting idea anyway.
– QHarr
Nov 10 at 23:31
@QHarr... does this help? I can take some more if needed.
– Able Archer
Nov 10 at 23:42
So, that is on one of the pages you navigated to? Can you right click inspect and on dev tools copy the html element (at the top of the page) and paste the html into pastebin? For what you have shown all I can say is that -115 can be selected by a css selector of .bet-price, but I don't know how often that occurs and if is present for each prop (likely but can't see). Also, can't see the other bits of info.
– QHarr
Nov 10 at 23:44
1
As I can't view page properly difficult to determine but looks like you can initially use class name to isolate information. For example, titles are within css selector of .league-header and then the rest of the info within .coupon-content.markets-container . Probably better if someone who can view the page assists further i'm afraid.
– QHarr
Nov 11 at 0:36
|
show 2 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I would like to scrape the NBA player prop bets from https://www.bovada.lv. I named the question ADVANCED because there are multiple teams, players, and categories.
Here is the HTML code as requested:
https://pastebin.com/UkY071uV
Here is the link that will bring you directly to the basketball section: https://www.bovada.lv/sports/basketball.
To get started...
The NBA player props are located in the basketball section. If you click the arrow next to each game, or ">", it will take you to another betting page. If the player props have been released you can find them located near the bottom of the page in the Player Prop section (note: the props are released before the games start).
Here is a sample of the data of one player I am looking for:
Total Points - LeBron James (LAL)
28.5 -115 -115
I would like to scrape all of the players names, the category and the bet odds. Unfortunately I didn't make it too far. The methods I have learned so far have had no success.
#import modules
from bs4 import BeautifulSoup
import requests, os
from selenium import webdriver
#initiate Selenium
os.chdir('C:webdrivers')
#enter user agent
header = 'User-agent' : 'ENTER USER_AGENT HERE'
options = webdriver.ChromeOptions(); options.add_argument("--start-maximized")
driver = webdriver.Chrome(chrome_options=options)
driver.get('https://www.bovada.lv/sports/basketball/nba')
soup = BeautifulSoup(driver.page_source, 'html.parser')
driver.quit()
#attempt at printing soup
print(soup)
I can't locate any of the respective players in the code. I figured it couldn't hurt to reach out for some help. Perhaps someone with more experience knows how to do this or can help lead me in the right direction.
I am new to web scraping and very appreciative of any assistance that you may offer. Thanks in advance for your time!
javascript python selenium web-scraping beautifulsoup
I would like to scrape the NBA player prop bets from https://www.bovada.lv. I named the question ADVANCED because there are multiple teams, players, and categories.
Here is the HTML code as requested:
https://pastebin.com/UkY071uV
Here is the link that will bring you directly to the basketball section: https://www.bovada.lv/sports/basketball.
To get started...
The NBA player props are located in the basketball section. If you click the arrow next to each game, or ">", it will take you to another betting page. If the player props have been released you can find them located near the bottom of the page in the Player Prop section (note: the props are released before the games start).
Here is a sample of the data of one player I am looking for:
Total Points - LeBron James (LAL)
28.5 -115 -115
I would like to scrape all of the players names, the category and the bet odds. Unfortunately I didn't make it too far. The methods I have learned so far have had no success.
#import modules
from bs4 import BeautifulSoup
import requests, os
from selenium import webdriver
#initiate Selenium
os.chdir('C:webdrivers')
#enter user agent
header = 'User-agent' : 'ENTER USER_AGENT HERE'
options = webdriver.ChromeOptions(); options.add_argument("--start-maximized")
driver = webdriver.Chrome(chrome_options=options)
driver.get('https://www.bovada.lv/sports/basketball/nba')
soup = BeautifulSoup(driver.page_source, 'html.parser')
driver.quit()
#attempt at printing soup
print(soup)
I can't locate any of the respective players in the code. I figured it couldn't hurt to reach out for some help. Perhaps someone with more experience knows how to do this or can help lead me in the right direction.
I am new to web scraping and very appreciative of any assistance that you may offer. Thanks in advance for your time!
javascript python selenium web-scraping beautifulsoup
javascript python selenium web-scraping beautifulsoup
edited Nov 12 at 20:58
asked Nov 10 at 22:53
Able Archer
968
968
1
I can't actually view as that site is not available here but are you saying you need to navigate to each of those pages made available by clicking in the basketball section and then on each prop page you need to scrape the info shown? Can you share initially the first page HTML using the snippet tool available via edit? Or it too long do a pastebin of the entire page HTML?
– QHarr
Nov 10 at 23:28
You can probably write something simple to grab the page links and then loop over them navigating to them (if using selenium) calling a custom function that extracts the required info returning a list and build a final dataframe from a list of lists. Assuming all items are present on each page. Starting idea anyway.
– QHarr
Nov 10 at 23:31
@QHarr... does this help? I can take some more if needed.
– Able Archer
Nov 10 at 23:42
So, that is on one of the pages you navigated to? Can you right click inspect and on dev tools copy the html element (at the top of the page) and paste the html into pastebin? For what you have shown all I can say is that -115 can be selected by a css selector of .bet-price, but I don't know how often that occurs and if is present for each prop (likely but can't see). Also, can't see the other bits of info.
– QHarr
Nov 10 at 23:44
1
As I can't view page properly difficult to determine but looks like you can initially use class name to isolate information. For example, titles are within css selector of .league-header and then the rest of the info within .coupon-content.markets-container . Probably better if someone who can view the page assists further i'm afraid.
– QHarr
Nov 11 at 0:36
|
show 2 more comments
1
I can't actually view as that site is not available here but are you saying you need to navigate to each of those pages made available by clicking in the basketball section and then on each prop page you need to scrape the info shown? Can you share initially the first page HTML using the snippet tool available via edit? Or it too long do a pastebin of the entire page HTML?
– QHarr
Nov 10 at 23:28
You can probably write something simple to grab the page links and then loop over them navigating to them (if using selenium) calling a custom function that extracts the required info returning a list and build a final dataframe from a list of lists. Assuming all items are present on each page. Starting idea anyway.
– QHarr
Nov 10 at 23:31
@QHarr... does this help? I can take some more if needed.
– Able Archer
Nov 10 at 23:42
So, that is on one of the pages you navigated to? Can you right click inspect and on dev tools copy the html element (at the top of the page) and paste the html into pastebin? For what you have shown all I can say is that -115 can be selected by a css selector of .bet-price, but I don't know how often that occurs and if is present for each prop (likely but can't see). Also, can't see the other bits of info.
– QHarr
Nov 10 at 23:44
1
As I can't view page properly difficult to determine but looks like you can initially use class name to isolate information. For example, titles are within css selector of .league-header and then the rest of the info within .coupon-content.markets-container . Probably better if someone who can view the page assists further i'm afraid.
– QHarr
Nov 11 at 0:36
1
1
I can't actually view as that site is not available here but are you saying you need to navigate to each of those pages made available by clicking in the basketball section and then on each prop page you need to scrape the info shown? Can you share initially the first page HTML using the snippet tool available via edit? Or it too long do a pastebin of the entire page HTML?
– QHarr
Nov 10 at 23:28
I can't actually view as that site is not available here but are you saying you need to navigate to each of those pages made available by clicking in the basketball section and then on each prop page you need to scrape the info shown? Can you share initially the first page HTML using the snippet tool available via edit? Or it too long do a pastebin of the entire page HTML?
– QHarr
Nov 10 at 23:28
You can probably write something simple to grab the page links and then loop over them navigating to them (if using selenium) calling a custom function that extracts the required info returning a list and build a final dataframe from a list of lists. Assuming all items are present on each page. Starting idea anyway.
– QHarr
Nov 10 at 23:31
You can probably write something simple to grab the page links and then loop over them navigating to them (if using selenium) calling a custom function that extracts the required info returning a list and build a final dataframe from a list of lists. Assuming all items are present on each page. Starting idea anyway.
– QHarr
Nov 10 at 23:31
@QHarr... does this help? I can take some more if needed.
– Able Archer
Nov 10 at 23:42
@QHarr... does this help? I can take some more if needed.
– Able Archer
Nov 10 at 23:42
So, that is on one of the pages you navigated to? Can you right click inspect and on dev tools copy the html element (at the top of the page) and paste the html into pastebin? For what you have shown all I can say is that -115 can be selected by a css selector of .bet-price, but I don't know how often that occurs and if is present for each prop (likely but can't see). Also, can't see the other bits of info.
– QHarr
Nov 10 at 23:44
So, that is on one of the pages you navigated to? Can you right click inspect and on dev tools copy the html element (at the top of the page) and paste the html into pastebin? For what you have shown all I can say is that -115 can be selected by a css selector of .bet-price, but I don't know how often that occurs and if is present for each prop (likely but can't see). Also, can't see the other bits of info.
– QHarr
Nov 10 at 23:44
1
1
As I can't view page properly difficult to determine but looks like you can initially use class name to isolate information. For example, titles are within css selector of .league-header and then the rest of the info within .coupon-content.markets-container . Probably better if someone who can view the page assists further i'm afraid.
– QHarr
Nov 11 at 0:36
As I can't view page properly difficult to determine but looks like you can initially use class name to isolate information. For example, titles are within css selector of .league-header and then the rest of the info within .coupon-content.markets-container . Probably better if someone who can view the page assists further i'm afraid.
– QHarr
Nov 11 at 0:36
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
This sites uses an internal JSON api to get the data. The full JSON data for your example can be found here : https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en
An example to extract your data with curl & jq :
curl -s "https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en" |
jq '.[0].events[0].displayGroups |
select(.description=="Player Props") |
.markets |
select(.description=="Total Points - LeBron James (LAL)")'
With python :
import requests
r = requests.get('https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en')
player_props = [
t["markets"]
for t in r.json()[0]["events"][0]["displayGroups"]
if t["description"] == "Player Props"
]
specific_player = [
t
for t in player_props[0]
if t["description"] == "Total Points - LeBron James (LAL)"
]
print(specific_player)
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
1
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
This sites uses an internal JSON api to get the data. The full JSON data for your example can be found here : https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en
An example to extract your data with curl & jq :
curl -s "https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en" |
jq '.[0].events[0].displayGroups |
select(.description=="Player Props") |
.markets |
select(.description=="Total Points - LeBron James (LAL)")'
With python :
import requests
r = requests.get('https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en')
player_props = [
t["markets"]
for t in r.json()[0]["events"][0]["displayGroups"]
if t["description"] == "Player Props"
]
specific_player = [
t
for t in player_props[0]
if t["description"] == "Total Points - LeBron James (LAL)"
]
print(specific_player)
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
1
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
add a comment |
up vote
1
down vote
accepted
This sites uses an internal JSON api to get the data. The full JSON data for your example can be found here : https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en
An example to extract your data with curl & jq :
curl -s "https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en" |
jq '.[0].events[0].displayGroups |
select(.description=="Player Props") |
.markets |
select(.description=="Total Points - LeBron James (LAL)")'
With python :
import requests
r = requests.get('https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en')
player_props = [
t["markets"]
for t in r.json()[0]["events"][0]["displayGroups"]
if t["description"] == "Player Props"
]
specific_player = [
t
for t in player_props[0]
if t["description"] == "Total Points - LeBron James (LAL)"
]
print(specific_player)
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
1
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
This sites uses an internal JSON api to get the data. The full JSON data for your example can be found here : https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en
An example to extract your data with curl & jq :
curl -s "https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en" |
jq '.[0].events[0].displayGroups |
select(.description=="Player Props") |
.markets |
select(.description=="Total Points - LeBron James (LAL)")'
With python :
import requests
r = requests.get('https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en')
player_props = [
t["markets"]
for t in r.json()[0]["events"][0]["displayGroups"]
if t["description"] == "Player Props"
]
specific_player = [
t
for t in player_props[0]
if t["description"] == "Total Points - LeBron James (LAL)"
]
print(specific_player)
This sites uses an internal JSON api to get the data. The full JSON data for your example can be found here : https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en
An example to extract your data with curl & jq :
curl -s "https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en" |
jq '.[0].events[0].displayGroups |
select(.description=="Player Props") |
.markets |
select(.description=="Total Points - LeBron James (LAL)")'
With python :
import requests
r = requests.get('https://www.bovada.lv/services/sports/event/v2/events/A/description/basketball/nba/los-angeles-lakers-sacramento-kings-201811102200?lang=en')
player_props = [
t["markets"]
for t in r.json()[0]["events"][0]["displayGroups"]
if t["description"] == "Player Props"
]
specific_player = [
t
for t in player_props[0]
if t["description"] == "Total Points - LeBron James (LAL)"
]
print(specific_player)
answered Nov 11 at 2:01
Bertrand Martel
16.5k134064
16.5k134064
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
1
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
add a comment |
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
1
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
This is what I received: for t in r.json()[0]["events"][0]["displayGroups"] IndexError: list index out of range.... I see that you entered only Lebron's name in the code. Is there anyway to scrape all of the player's names @Bertrand Martel? Thanks for your attempt. I will try this again tomorrow.
– Able Archer
Nov 11 at 5:55
1
1
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
your original link bovada.lv/sports/basketball/nba/… doesn't return any data either anymore
– Bertrand Martel
Nov 11 at 13:24
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
I will study your code to see what I can learn from it. Thanks @Bertrand Martel!
– Able Archer
Nov 12 at 19:40
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
Is there an easier way to do this sir @Andersson? There are multiple games each day. The code above looks like its just for one game and one player. I was hoping to get all of the players from each game.
– Able Archer
Nov 12 at 20:46
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
I have been learning from your answer @Bertrand Martel. It's very thorough and the community can learn a lot from this. Thanks for your response!
– Able Archer
Nov 15 at 18:49
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244218%2fhow-to-complete-an-advanced-web-scrape-of-nba-player-props%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I can't actually view as that site is not available here but are you saying you need to navigate to each of those pages made available by clicking in the basketball section and then on each prop page you need to scrape the info shown? Can you share initially the first page HTML using the snippet tool available via edit? Or it too long do a pastebin of the entire page HTML?
– QHarr
Nov 10 at 23:28
You can probably write something simple to grab the page links and then loop over them navigating to them (if using selenium) calling a custom function that extracts the required info returning a list and build a final dataframe from a list of lists. Assuming all items are present on each page. Starting idea anyway.
– QHarr
Nov 10 at 23:31
@QHarr... does this help? I can take some more if needed.
– Able Archer
Nov 10 at 23:42
So, that is on one of the pages you navigated to? Can you right click inspect and on dev tools copy the html element (at the top of the page) and paste the html into pastebin? For what you have shown all I can say is that -115 can be selected by a css selector of .bet-price, but I don't know how often that occurs and if is present for each prop (likely but can't see). Also, can't see the other bits of info.
– QHarr
Nov 10 at 23:44
1
As I can't view page properly difficult to determine but looks like you can initially use class name to isolate information. For example, titles are within css selector of .league-header and then the rest of the info within .coupon-content.markets-container . Probably better if someone who can view the page assists further i'm afraid.
– QHarr
Nov 11 at 0:36