Skip to content

Commit

Permalink
Fix crash introduced by removal of FrozenDict in 5613807, but without…
Browse files Browse the repository at this point in the history
… constantly reallocating dicts
  • Loading branch information
falconkirtaran committed May 15, 2017
1 parent f946d3f commit be96abc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions wpull/scraper/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,23 @@
_logger = StyleAdapter(logging.getLogger(__name__))


LinkInfo = collections.namedtuple(
_BaseLinkInfo = collections.namedtuple(
'LinkInfoType',
[
'element', 'tag', 'attrib', 'link',
'inline', 'linked', 'base_link', 'value_type',
'link_type'
]
)
'''Information about a link in a lxml document.

class LinkInfo(_BaseLinkInfo):
def __hash__(self):
return self.link.__hash__()

def __eq__(self, other):
return self.link.__eq__(other['link'])

'''Information about a link in a lxml document. Comparable on link only.
Attributes:
element: An instance of :class:`.document.HTMLReadElement`.
Expand Down

0 comments on commit be96abc

Please sign in to comment.