I am trying to create a procedure with Python 2.7 which retrieves the betting odds from different betting websites (such as betfair, ladbrokes etc) for statistical analysis. I am fairly new to python (i struggle with all the I.T Jargon) but i have done some research and have come up with the following structure.
from urllib import urlopen
import re
response = urlopen('http://beta.betfair.com/football/event?id=26821411')
html = response.read()
jay = re.compile(b'.*id="m57290-sel1_105142518-58805-0-back"><span class="price">(.*)</span></button>')
jay2 = re.findall(jay,html)
print(jay2)
This was supposed to go to the betfair website pull certain odds and print it, but i get nothing!
I have also tried to incorporate Beautifulsoup but my mac does not seem to be installing it properly or something. I keep getting
"ImportError: No module named beautifulsoup"
when i try to import BeautifulSoup from BeautifulSoup. I have tried installing using easyinstall and i have run the setup.py script also.
Similar scenario for scrapy.
I have done some further research and Java/javascript comes up quite frequently...
Can someone please help?
thanks in advance