Chroma Funk
Chroma Funk

Reputation: 71

Parsing with BeautifulSoup

from BeautifulSoup import BeautifulSoup
#from HTMLParser import HTMLParser
import urllib2

req = urllib2.urlopen('http://www.grupodpa.es')


soup = BeautifulSoup(req)
for link in soup.findAll("a", email=True):
    print link["email"]

Not getting printed the email address on that page, nor any error. Do you know what's wrong with this code ?

Upvotes: 0

Views: 36

Answers (1)

Mathias
Mathias

Reputation: 1500

There is nothing wrong with the code, the email address is just not enclosed in an "a" tag. Probably to prevent scraping the email address by spammers.

Upvotes: 1

Related Questions