def links(self, external=True):
domain = URLParser(self.url).domain<EOL>links = []<EOL>for a in self("<STR_LIT:a>"):<EOL><INDENT>for attribute, value in a.attrs:<EOL><INDENT>if attribute == "<STR_LIT>":<EOL><INDENT>if not externalor (value.startswith("<STR_LIT>") and value.find("<STR_LIT>"+domain) < <NUM_LIT:0>):<EOL><INDENT>links.append(value)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return links<EOL>
Retrieves links in the page.

        Returns a list of URL's.
        By default, only external URL's are returned.
        External URL's starts with http:// and point to another
        domain than the domain the page is on.