mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Google: Fix plugin.
This commit is contained in:
parent
9be5676dfd
commit
01f166a224
@ -79,9 +79,9 @@ class GoogleHTMLParser(HTMLParser):
|
|||||||
and self.state == ParserState.OUTSIDE:
|
and self.state == ParserState.OUTSIDE:
|
||||||
self.state = ParserState.IN_LINK
|
self.state = ParserState.IN_LINK
|
||||||
href = attrs['href'][len('/url?q='):]
|
href = attrs['href'][len('/url?q='):]
|
||||||
self.current_link = utils.web.urlunquote(utils.web.htmlToText(href.split('&sa')[0]))
|
self.current_link = utils.web.urlunquote(href.split('&sa')[0])
|
||||||
|
|
||||||
elif tag == 'div' and 'a' in self.stack and attrs.get('role') == 'heading' \
|
elif tag == 'div' and 'a' in self.stack and 'h3' in self.stack \
|
||||||
and self.state == ParserState.IN_LINK:
|
and self.state == ParserState.IN_LINK:
|
||||||
self.state = ParserState.IN_TITLE
|
self.state = ParserState.IN_TITLE
|
||||||
mark = DomMark.HEADING
|
mark = DomMark.HEADING
|
||||||
|
Loading…
Reference in New Issue
Block a user