[Answer]-Python – how to correctly use htmlparser on alexa.com

1👍

You can check if the URL starts with /siteinfo/ to eliminate irrelevant ones:

if self.next_link_text_pair is not None:
    if self.next_link_text_pair[0].startswith('/siteinfo/'):
        print self.next_link_text_pair[1]
👤Selcuk

Leave a comment