Returns a list of Links parsed from the given HTML string.
(self, html, url="")
| 3059 | HTMLParser.__init__(self) |
| 3060 | |
| 3061 | def parse(self, html, url=""): |
| 3062 | """ Returns a list of Links parsed from the given HTML string. |
| 3063 | """ |
| 3064 | if html is None: |
| 3065 | return None |
| 3066 | self._url = url |
| 3067 | self._data = [] |
| 3068 | self.feed(self.clean(html)) |
| 3069 | self.close() |
| 3070 | self.reset() |
| 3071 | return self._data |
| 3072 | |
| 3073 | def handle_starttag(self, tag, attributes): |
| 3074 | if tag == "a": |