Possible Duplicate:
BeautifulSoup getting href
I am using beautiful soup and below is my code
import urllib2
data = urllib2.urlopen("some_url")
html_data = data.read()
soup = BeautifulSoup(html_data)
href_tags = soup.findAll('a')
result:
href_tags =
[<a href="http://www.exampl.com/score_card" target="_blank" style="font-family:arial;color:#192e94;">Click Here</a>,
<a href="https://example.icims.com/jobs/search?pr=5">what is this</a>,
<a href="https://example.com/search?pr=6">Cool</a>,
<a href="https://example.com/help/host/search?pr=7">Hello</a>]
But actually i want href from all anchor tags , how can i extract href tags.
Thanks in advance………
Try looping over the matches: