racing post web scraping
<p>I'm very new to Python and web scraping. I want to scrape the racing post site to get the daily races and the stats for each race.</p>

<p>I'm trying to get all the partial links for the races to use later to extract the stats for that race. (<a href="http://betting.racingpost.com/horses/cards/" rel="nofollow">http://betting.racingpost.com/horses/cards/</a>)</p>

<p>Example:
<a href="/horses/cards/card.sd?race_id=643822&amp;r_date=2016-03-04" title="32Red.com Fillies' Handicap Cl51m (1m1y) 4yo+">32Red.com Fillies´ Handicap 1m1y</a></p>

<p>I'm using this code, but I get all links in the page. I need to locate the extraction data, but I have no clue how to do that. I have tried several approaches but I didn't got the expected results.</p>

<pre><code>from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("http://betting.racingpost.com/horses/cards/")
bsObj = BeautifulSoup(html.read())
namelist=bsObj.select("a")
for i in namelist:
    print(i['href'])
</code></pre>