sigopt / sigopt-examples

Optimization Examples with SigOpt
MIT License
199 stars 64 forks source link

user question - nba api #71

Open startakovsky opened 7 years ago

startakovsky commented 7 years ago

When I run the setup_env.sh in the sigopt beats vegas module, it just says "downloading season 1" and doesn't do anything. Are there any common problems that arise executing this?

startakovsky commented 7 years ago

The issue you're seeing is from the ./sigopt-beats-vegas/boxscores/scraper/srape_all script. The logic for the scraping is in the scraper.py module and nba.com regularly updates their API so that is likely the problem you're seeing.

While we do not regularly keep this example up-to-date, we encourage Pull Requests from the greater community.

kevintee commented 7 years ago

Ran into the same problem, this really helped!

alexandraj777 commented 7 years ago

Can we close this issue?

alexandraj777 commented 7 years ago

Should we add comments to the readme maybe and resolve?

dlman commented 7 years ago

Ran into same problem, should fix or at least put into readme.

dlman commented 7 years ago

Actually tried to fix the scraper code, apparently the stats.nba pages uses a different URL and also the content within the page is js injected, so requests doesn't pull any of the stats, may need to use something else like selenium. May take a stab at it later.

alexandraj777 commented 7 years ago

The real solution here might be for us to take the original dataset and load it into a publicly available bucket on s3 :) Then the scraper is available for the curious but we don't run into so many web scraping issues

dlman commented 7 years ago

Sounds like a plan!