Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105043
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2016-03-16 08:01 -0700 |
| References | <9c194be2-d47f-477f-a560-084b46415d7f@googlegroups.com> <mailman.207.1458137291.12893.python-list@python.org> |
| Message-ID | <5e47f1c7-6217-43c7-9464-c445f8ded2df@googlegroups.com> (permalink) |
| Subject | Re: Beautifulsoap |
| From | eproser@gmail.com |
Yes, for my hobby i want extract odds.
The code is:
from bs4 import BeautifulSoup
import urllib2
url = "http://www.betexplorer.com/soccer/england/premier-league-2014-2015/results/"
content = urllib2.urlopen(url).read()
soup = BeautifulSoup(content)
odds = soup.find_all("td", class_="odds")
for odd in odds:
print odd
And I have this list of object:
...
<td class="odds" data-odd="3.70"></td>
<td class="odds" data-odd="3.65"></td>
<td class="odds" data-odd="3.48"></td>
From this object I'm interesting only 3.70 3.65 3.48 etc
I'm no a programmer, my hobby is analyze soccer matchs to try to win :-)
I chose python because I think is the best :-)
Thank you in advance
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Beautifulsoap eproser@gmail.com - 2016-03-16 06:36 -0700
Re: Beautifulsoap Joel Goldstick <joel.goldstick@gmail.com> - 2016-03-16 10:08 -0400
Re: Beautifulsoap eproser@gmail.com - 2016-03-16 08:01 -0700
Re: Beautifulsoap eproser@gmail.com - 2016-03-16 10:07 -0700
Re: Beautifulsoap eproser@gmail.com - 2016-03-16 10:25 -0700
csiph-web