here i have a link  <a href="http://raver2046.ath.cx/CV/";>cv network 
admin</a>

how to extract  "cv network admin"


here is the code i have find to exctract link but not title of link

----------------------------
import htmllib, formatter, urllib
class x(htmllib.HTMLParser):
    def dump(self, tag, attrs):
        #print tag,
        for a, v in attrs:
            if a in ['a', 'src', 'href']:
                print v,

        print
    #def do_img(self, attrs):
    #    self.dump('img', attrs)
    def start_a(self, attrs):
        self.dump('a', attrs)
    #def start_form(self, attrs):
    #    self.dump('form', attrs)

y = x(formatter.NullFormatter())
y.feed(urllib.urlopen('http://www.aquabase.org/fish/dump.php3').read())
y.close()


----------------------------

http://raver2046.ath.cx/CV/cv_fr.html 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to