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!










share|improve this question



















  • 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














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!










share|improve this question



















  • 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












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!










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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












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)





share|improve this answer




















  • 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










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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

























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)





share|improve this answer




















  • 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














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)





share|improve this answer




















  • 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












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)





share|improve this answer












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)






share|improve this answer












share|improve this answer



share|improve this answer










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
















  • 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

















 

draft saved


draft discarded















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

ReactJS Fetched API data displays live - need Data displayed static

政党