nodes: 0, module; 1, function_definition; 2, function_name:find; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, dictionary_splat_pattern; 13, expression_statement; 14, if_statement; 15, if_statement; 16, expression_statement; 17, if_statement; 18, expression_statement; 19, for_statement; 20, if_statement; 21, if_statement; 22, identifier:limit; 23, None; 24, identifier:reverse; 25, False; 26, identifier:sort; 27, None; 28, identifier:exclude; 29, None; 30, identifier:duplicates; 31, True; 32, identifier:pretty; 33, False; 34, identifier:filters; 35, comment:""" Using filters and sorts, this finds all hyperlinks
          on a web page
  
          :param limit: Crop results down to limit specified
          :param reverse: Reverse the list of links, useful for before limiting
          :param exclude: Remove links from list
          :param duplicates: Determines if identical URLs should be displayed
          :param pretty: Quick and pretty formatting using pprint
          :param filters: All the links to search for """; 36, comparison_operator:exclude is None; 37, block; 38, comparison_operator:'href' not in filters; 39, block; 40, assignment; 41, identifier:reverse; 42, block; 43, assignment; 44, identifier:anchor; 45, identifier:search; 46, block; 47, comparison_operator:sort is not None; 48, block; 49, identifier:pretty; 50, block; 51, else_clause; 52, identifier:exclude; 53, None; 54, expression_statement; 55, string; 56, identifier:filters; 57, expression_statement; 58, identifier:search; 59, call; 60, expression_statement; 61, identifier:links; 62, list; 63, expression_statement; 64, try_statement; 65, try_statement; 66, expression_statement; 67, for_statement; 68, if_statement; 69, if_statement; 70, if_statement; 71, identifier:sort; 72, None; 73, expression_statement; 74, expression_statement; 75, return_statement; 76, block; 77, assignment; 78, string_content:href; 79, assignment; 80, attribute; 81, argument_list; 82, call; 83, assignment; 84, block; 85, except_clause; 86, block; 87, except_clause; 88, assignment; 89, identifier:nixd; 90, identifier:exclude; 91, block; 92, not_operator; 93, block; 94, not_operator; 95, block; 96, boolean_operator; 97, block; 98, assignment; 99, assignment; 100, call; 101, return_statement; 102, identifier:exclude; 103, list; 104, subscript; 105, True; 106, attribute; 107, identifier:findAll; 108, string; 109, dictionary_splat; 110, attribute; 111, argument_list; 112, identifier:build_link; 113, attribute; 114, expression_statement; 115, identifier:KeyError; 116, block; 117, expression_statement; 118, identifier:KeyError; 119, block; 120, identifier:ignore_link; 121, False; 122, for_statement; 123, identifier:duplicates; 124, for_statement; 125, identifier:ignore_link; 126, expression_statement; 127, comparison_operator:limit is not None; 128, comparison_operator:len(links) == limit; 129, break_statement; 130, identifier:links; 131, call; 132, identifier:pp; 133, call; 134, attribute; 135, argument_list; 136, identifier:links; 137, identifier:filters; 138, string; 139, identifier:self; 140, identifier:_soup; 141, string_content:a; 142, identifier:filters; 143, identifier:search; 144, identifier:reverse; 145, identifier:anchor; 146, identifier:attrs; 147, assignment; 148, pass_statement; 149, assignment; 150, pass_statement; 151, pattern_list; 152, call; 153, block; 154, identifier:link; 155, identifier:links; 156, block; 157, call; 158, identifier:limit; 159, None; 160, call; 161, identifier:limit; 162, identifier:sorted; 163, argument_list; 164, attribute; 165, argument_list; 166, identifier:pp; 167, identifier:pprint; 168, identifier:links; 169, string_content:href; 170, subscript; 171, call; 172, subscript; 173, boolean_operator; 174, identifier:key; 175, identifier:value; 176, attribute; 177, argument_list; 178, if_statement; 179, if_statement; 180, attribute; 181, argument_list; 182, identifier:len; 183, argument_list; 184, identifier:links; 185, keyword_argument; 186, keyword_argument; 187, identifier:pprint; 188, identifier:PrettyPrinter; 189, keyword_argument; 190, identifier:build_link; 191, string; 192, identifier:seoify_hyperlink; 193, argument_list; 194, identifier:build_link; 195, string; 196, attribute; 197, subscript; 198, identifier:six; 199, identifier:iteritems; 200, identifier:nixd; 201, comparison_operator:key in build_link; 202, block; 203, comparison_operator:link['href'] == anchor['href']; 204, block; 205, identifier:links; 206, identifier:append; 207, identifier:build_link; 208, identifier:links; 209, identifier:key; 210, identifier:sort; 211, identifier:reverse; 212, identifier:reverse; 213, identifier:indent; 214, integer:4; 215, string_content:seo; 216, subscript; 217, string_content:text; 218, identifier:anchor; 219, identifier:string; 220, identifier:build_link; 221, string; 222, identifier:key; 223, identifier:build_link; 224, if_statement; 225, subscript; 226, subscript; 227, expression_statement; 228, identifier:anchor; 229, string; 230, string_content:seo; 231, parenthesized_expression; 232, block; 233, else_clause; 234, identifier:link; 235, string; 236, identifier:anchor; 237, string; 238, assignment; 239, string_content:href; 240, boolean_operator; 241, for_statement; 242, block; 243, string_content:href; 244, string_content:href; 245, identifier:ignore_link; 246, True; 247, call; 248, not_operator; 249, identifier:item; 250, subscript; 251, block; 252, expression_statement; 253, identifier:isinstance; 254, argument_list; 255, call; 256, identifier:build_link; 257, identifier:key; 258, expression_statement; 259, assignment; 260, subscript; 261, attribute; 262, identifier:isinstance; 263, argument_list; 264, assignment; 265, identifier:ignore_link; 266, call; 267, identifier:build_link; 268, identifier:key; 269, identifier:collections; 270, identifier:Iterable; 271, subscript; 272, attribute; 273, identifier:ignore_link; 274, call; 275, identifier:exclude_match; 276, argument_list; 277, identifier:build_link; 278, identifier:key; 279, identifier:six; 280, identifier:string_types; 281, identifier:exclude_match; 282, argument_list; 283, identifier:value; 284, subscript; 285, identifier:value; 286, identifier:item; 287, identifier:build_link; 288, identifier:key
code: def find(self, limit=None, reverse=False, sort=None,
               exclude=None, duplicates=True, pretty=False, **filters):
          """ Using filters and sorts, this finds all hyperlinks
          on a web page
  
          :param limit: Crop results down to limit specified
          :param reverse: Reverse the list of links, useful for before limiting
          :param exclude: Remove links from list
          :param duplicates: Determines if identical URLs should be displayed
          :param pretty: Quick and pretty formatting using pprint
          :param filters: All the links to search for """
          if exclude is None:
              exclude = []
  
          if 'href' not in filters:
              filters['href'] = True
          search = self._soup.findAll('a', **filters)
  
          if reverse:
              search.reverse()
  
          links = []
          for anchor in search:
              build_link = anchor.attrs
              try:
                  build_link[u'seo'] = seoify_hyperlink(anchor['href'])
              except KeyError:
                  pass
  
              try:
                  build_link[u'text'] = anchor.string or build_link['seo']
              except KeyError:
                  pass
  
              ignore_link = False
              for nixd in exclude:
                  for key, value in six.iteritems(nixd):
                      if key in build_link:
                          if (isinstance(build_link[key], collections.Iterable)
                                  and not isinstance(build_link[key], six.string_types)):
                             for item in build_link[key]:
                                  ignore_link = exclude_match(value, item)
                          else:
                              ignore_link = exclude_match(value, build_link[key])
  
              if not duplicates:
                  for link in links:
                      if link['href'] == anchor['href']:
                          ignore_link = True
  
              if not ignore_link:
                  links.append(build_link)
  
              if limit is not None and len(links) == limit:
                  break
  
          if sort is not None:
              links = sorted(links, key=sort, reverse=reverse)
  
          if pretty:
              pp = pprint.PrettyPrinter(indent=4)
              return pp.pprint(links)
          else:
              return links