Giter Club home page Giter Club logo

sbrscraper's Introduction

SBRscraper

Script to scrape SBR's betting-odds. Can be tailored for other sports and other books. Practical application of this is to accumulate lines of all games (currently for MLB) over time and have yourself an odds database.

Note: you must either have Tor open when running this code or you must comment out that section of code prior to running.

Tips for using Tor

  1. install tor
  2. assuming OS is Ubuntu, these instructions worked for getting geckodriver installed: https://askubuntu.com/questions/851401/where-to-find-geckodriver-needed-by-selenium-python-package/863211#863211

Future TODO's:

sbrscraper's People

Contributors

sharpchicity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbrscraper's Issues

SBR API

Question for you, SharpChiCity - how did you find out about the SBR API? (I know this isn't an issue per se, and I'm happy to close/delete it soon, but I was really curious.)

SBR Redirect

Hi,

I'm getting an interesting issue where SBR will always redirect to a page that does not have the betting odds or OddsGridModule_3. Instead, it's hitting this page: http://imgur.com/6HFm1eV.

Any idea how or why it's redirecting me? This happens sometimes too when I just throw the url in FF. It will also change the url from
http://www.sportsbookreview.com/betting-odds/mlb-baseball/?date=20160406

to:

http://www.sportsbookreview.com/betting-odds/mlb-baseball/?date=20160406&

Thanks for the help!

Mike

Blocked request

I suddenly got an error message in the soup_url function which was not occurring a week ago last time I used it; when scraping the url 'https://www.sportsbookreview.com/betting-odds/nba-basketball/money-line/?date=20210129' I get the following soup, which states the the request has been blocked:

<title>463 Restricted Client - DOSarrest Internet Security</title> <script> function id_process(n){for(var t=n+"=",r=document.cookie.split(";"),e=0;e
DOSarrest Internet Security is a cloud based fully managed DDoS protection service. This request has been blocked by DOSarrest due to the above violation. If you believe you are getting blocked in error please contact the administrator of <script> function myFunction() { var x = location.host; document.getElementById("host").innerHTML = x; } </script>this website
to resolve this issue.

DOSarrest Internet Security | DDoS Protection

463
You DOSarrest
Protection
Host
<script> function myFunction2() { var x = location.host; document.getElementById("host2").innerHTML = x; } </script>
ID:
<script>document.getElementById("id_finish").innerHTML=id_process("dis-request-id");</script>
|
Your IP Address:
<script>document.getElementById("addr_finish").innerHTML=id_process("dis-remote-addr");</script>
|
Timestamp:
<script>document.getElementById("ts_finish").innerHTML=id_process("dis-timestamp");</script>

463 Restricted Client: This resource is not available for access by your client software. This request has been blocked. Please retry your request from a different client.

DOSarrest Internet Security is a cloud based fully managed DDoS protection service. This request has been blocked by DOSarrest due to the above violation. If you believe you are getting blocked in error please contact the administrator of <script> function myFunction3() { var x = location.host; document.getElementById("host3").innerHTML = x; } </script>this website

to resolve this issue.

It seems like the site may have changed their security settings but I'm not sure if there's any way to fix this?

Change new url to different sports

In the TODO list in the read me, you list the new URL from SBR. Do you know how you could change this to other sports? Right now it looks like it's only MLB events.

Small error leading to last column not having a header

Minor error that has a major effect on the output.

On line 407

f.write('Game_ID,Date,Time_FG_ML,HA,Team,Team_SP,Team_SP_hand,Opp,Opp_SP,Opp_SP_hand)
you are missing a comma "," at the end of Opp_SP_hand which is causing this header to merge with the next header on line 408 and therefore all the columns after this one are off by one and shifted to the left.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.