Beispiel #1
0
    def __init__(self, tag='a', attr='href'):
        """Initialize attributes"""
        FixedSGMLParser.__init__(self)

        self.scan_tag = tag if callable(tag) else lambda t: t == tag
        self.scan_attr = attr if callable(attr) else lambda a: a == attr
        self.current_request = None
Beispiel #2
0
 def __init__(self, tag="a", attr="href", unique=False, process_value=None):
     FixedSGMLParser.__init__(self)
     self.scan_tag = tag if callable(tag) else lambda t: t == tag
     self.scan_attr = attr if callable(attr) else lambda a: a == attr
     self.process_value = (lambda v: v) if process_value is None else process_value
     self.current_link = None
     self.unique = unique
Beispiel #3
0
    def __init__(self, tag='a', attr='href'):
        """Initialize attributes"""
        FixedSGMLParser.__init__(self)

        self.scan_tag = tag if callable(tag) else lambda t: t == tag
        self.scan_attr = attr if callable(attr) else lambda a: a == attr
        self.current_request = None
Beispiel #4
0
 def __init__(self, tag="a", attr="href", unique=False, process_value=None):
     FixedSGMLParser.__init__(self)
     self.scan_tag = tag if callable(tag) else lambda t: t == tag
     self.scan_attr = attr if callable(attr) else lambda a: a == attr
     self.process_value = (lambda v: v) if process_value is None else process_value
     self.current_link = None
     self.unique = unique
Beispiel #5
0
 def reset(self):
     FixedSGMLParser.reset(self)
     self.links = []
     self.base_url = None
Beispiel #6
0
 def reset(self):
     """Reset state"""
     FixedSGMLParser.reset(self)
     self.requests = []
     self.base_url = None
Beispiel #7
0
 def reset(self):
     FixedSGMLParser.reset(self)
     self.links = []
     self.base_url = None
     self.current_link = None
Beispiel #8
0
 def reset(self):
     """Reset state"""
     FixedSGMLParser.reset(self)
     self.requests = []
     self.base_url = None