验证中...
7.21 杭州源创会火热报名中,一起来看看移动开发如何紧跟浪潮?
语言: Python
分类: 编程语言基础
最后更新于 2018-07-12 17:40
BeautifulSoup.py
原始数据 复制代码
==== 对象名称:soup,类继承关系:(<class 'bs4.BeautifulSoup'>, <class 'bs4.element.Tag'>, <class 'bs4.element.PageElement'>, <class 'object'>),内存消耗:56(递归子类总大小:20284)Byte ====
成员变量:
1、ASCII_SPACES
2、DEFAULT_BUILDER_FEATURES ['html', 'fast']
3、HTML_FORMATTERS {'html': <bound method HTMLAwareEntitySubstitution.substitute_html of <class 'bs4.element.HTMLAwareEntitySubstitution'>>, 'minimal': <bound method HTMLAwareEntitySubstitution.substitute_xml of [...]
4、NO_PARSER_SPECIFIED_WARNING No parser was explicitly specified, so I'm using the best available %(markup_type)s parser for this system ("%(parser)s"). This usually isn't a problem, but if you run this code on another [...]
5、ROOT_TAG_NAME [document]
6、XML_FORMATTERS {'html': <bound method EntitySubstitution.substitute_html of <class 'bs4.dammit.EntitySubstitution'>>, 'minimal': <bound method EntitySubstitution.substitute_xml of <class [...]
7、__dict__ {'builder': <bs4.builder._lxml.LXMLTreeBuilder object at 0x00000174A57BBE48>, 'is_xml': False, 'known_xml': False, 'parse_only': None, 'markup': None, 'original_encoding': None, [...]
8、__doc__ This class defines the basic interface called by the tree builders. These methods will be called by the parser: reset() feed(markup) The tree builder may call these methods from its feed() [...]
9、__module__ bs4
10、__weakref__ None
11、_is_xml False
12、_most_recent_element aabb
13、_select_debug False
14、_selector_combinators ['>', '+', '~']
15、attribselect_re re.compile('^(?P<tag>[a-zA-Z0-9][-.a-zA-Z0-9:_]*)?\\[(?P<attribute>[\\w-]+)(?P<operator>[=~\\|\\^\\$\\*]?)=?"?(?P<value>[^\\]"]*)"?\\]$')
16、attrs {}
17、builder <bs4.builder._lxml.LXMLTreeBuilder object at 0x00000174A57BBE48>
18、can_be_empty_element False
19、children <list_iterator object at 0x00000174B68D8EB8>
20、contains_replacement_characters False
21、contents [<html><body><p>aabb</p></body></html>]
22、current_data []
23、declared_html_encoding None
24、descendants <generator object descendants at 0x00000174B68DB6D0>
25、hidden 1
26、isSelfClosing False
27、is_empty_element False
28、is_xml False
29、known_xml False
30、markup None
31、name [document]
32、namespace None
33、next None
34、nextSibling None
35、next_element None
36、next_elements <generator object next_elements at 0x00000174B68DB678>
37、next_sibling None
38、next_siblings <generator object next_siblings at 0x00000174B68DB780>
39、original_encoding None
40、parent None
41、parents <generator object parents at 0x00000174B68DB728>
42、parse_only None
43、prefix None
44、preserve_whitespace_tag_stack []
45、preserve_whitespace_tags {'pre', 'textarea'}
46、previous None
47、previousSibling None
48、previous_element None
49、previous_elements <generator object previous_elements at 0x00000174B68DB830>
50、previous_sibling None
51、previous_siblings <generator object previous_siblings at 0x00000174B68DB7D8>
52、quoted_colon re.compile('"[^"]*:[^"]*"')
53、string aabb
54、strings <generator object _all_strings at 0x00000174B68DB8E0>
55、stripped_strings <generator object stripped_strings at 0x00000174B68DB888>
56、tagStack [<html><body><p>aabb</p></body></html>]
57、tag_name_re re.compile('^[a-zA-Z0-9][-.a-zA-Z0-9:_]*$')
58、text aabb
成员方法:
1、__bool__ <bound method Tag.__bool__ of <html><body><p>aabb</p></body></html>>
2、__call__ <bound method Tag.__call__ of <html><body><p>aabb</p></body></html>>
3、__class__ <class 'bs4.BeautifulSoup'>
4、__contains__ <bound method Tag.__contains__ of <html><body><p>aabb</p></body></html>>
5、__copy__ <bound method BeautifulSoup.__copy__ of <html><body><p>aabb</p></body></html>>
6、__delattr__ <method-wrapper '__delattr__' of BeautifulSoup object at 0x00000174A5799358>
7、__delitem__ <bound method Tag.__delitem__ of <html><body><p>aabb</p></body></html>>
8、__dir__ <built-in method __dir__ of BeautifulSoup object at 0x00000174A5799358>
9、__eq__ <bound method Tag.__eq__ of <html><body><p>aabb</p></body></html>>
10、__format__ <built-in method __format__ of BeautifulSoup object at 0x00000174A5799358>
11、__ge__ <method-wrapper '__ge__' of BeautifulSoup object at 0x00000174A5799358>
12、__getattr__ <bound method Tag.__getattr__ of <html><body><p>aabb</p></body></html>>
13、__getattribute__ <method-wrapper '__getattribute__' of BeautifulSoup object at 0x00000174A5799358>
14、__getitem__ <bound method Tag.__getitem__ of <html><body><p>aabb</p></body></html>>
15、__getstate__ <bound method BeautifulSoup.__getstate__ of <html><body><p>aabb</p></body></html>>
16、__gt__ <method-wrapper '__gt__' of BeautifulSoup object at 0x00000174A5799358>
17、__hash__ <bound method Tag.__hash__ of <html><body><p>aabb</p></body></html>>
18、__init__ <bound method BeautifulSoup.__init__ of <html><body><p>aabb</p></body></html>>
19、__init_subclass__ <built-in method __init_subclass__ of type object at 0x00000174B4CBA228>
20、__iter__ <bound method Tag.__iter__ of <html><body><p>aabb</p></body></html>>
21、__le__ <method-wrapper '__le__' of BeautifulSoup object at 0x00000174A5799358>
22、__len__ <bound method Tag.__len__ of <html><body><p>aabb</p></body></html>>
23、__lt__ <method-wrapper '__lt__' of BeautifulSoup object at 0x00000174A5799358>
24、__ne__ <bound method Tag.__ne__ of <html><body><p>aabb</p></body></html>>
25、__new__ <built-in method __new__ of type object at 0x0000000054EA45C0>
26、__reduce__ <built-in method __reduce__ of BeautifulSoup object at 0x00000174A5799358>
27、__reduce_ex__ <built-in method __reduce_ex__ of BeautifulSoup object at 0x00000174A5799358>
28、__repr__ <bound method Tag.__unicode__ of <html><body><p>aabb</p></body></html>>
29、__setattr__ <method-wrapper '__setattr__' of BeautifulSoup object at 0x00000174A5799358>
30、__setitem__ <bound method Tag.__setitem__ of <html><body><p>aabb</p></body></html>>
31、__sizeof__ <built-in method __sizeof__ of BeautifulSoup object at 0x00000174A5799358>
32、__str__ <bound method Tag.__unicode__ of <html><body><p>aabb</p></body></html>>
33、__subclasshook__ <built-in method __subclasshook__ of type object at 0x00000174B4CBA228>
34、__unicode__ <bound method Tag.__unicode__ of <html><body><p>aabb</p></body></html>>
35、_all_strings <bound method Tag._all_strings of <html><body><p>aabb</p></body></html>>
36、_attr_value_as_string <bound method PageElement._attr_value_as_string of <html><body><p>aabb</p></body></html>>
37、_attribute_checker <bound method PageElement._attribute_checker of <html><body><p>aabb</p></body></html>>
38、_check_markup_is_url <function BeautifulSoup._check_markup_is_url at 0x00000174B5F926A8>
39、_feed <bound method BeautifulSoup._feed of <html><body><p>aabb</p></body></html>>
40、_find_all <bound method PageElement._find_all of <html><body><p>aabb</p></body></html>>
41、_find_one <bound method PageElement._find_one of <html><body><p>aabb</p></body></html>>
42、_formatter_for_name <bound method PageElement._formatter_for_name of <html><body><p>aabb</p></body></html>>
43、_lastRecursiveChild <bound method PageElement._last_descendant of <html><body><p>aabb</p></body></html>>
44、_last_descendant <bound method PageElement._last_descendant of <html><body><p>aabb</p></body></html>>
45、_popToTag <bound method BeautifulSoup._popToTag of <html><body><p>aabb</p></body></html>>
46、_should_pretty_print <bound method Tag._should_pretty_print of <html><body><p>aabb</p></body></html>>
47、_tag_name_matches_and <bound method PageElement._tag_name_matches_and of <html><body><p>aabb</p></body></html>>
48、append <bound method PageElement.append of <html><body><p>aabb</p></body></html>>
49、childGenerator <bound method Tag.childGenerator of <html><body><p>aabb</p></body></html>>
50、clear <bound method Tag.clear of <html><body><p>aabb</p></body></html>>
51、currentTag <html><body><p>aabb</p></body></html>
52、decode <bound method BeautifulSoup.decode of <html><body><p>aabb</p></body></html>>
53、decode_contents <bound method Tag.decode_contents of <html><body><p>aabb</p></body></html>>
54、decompose <bound method Tag.decompose of <html><body><p>aabb</p></body></html>>
55、encode <bound method Tag.encode of <html><body><p>aabb</p></body></html>>
56、encode_contents <bound method Tag.encode_contents of <html><body><p>aabb</p></body></html>>
57、endData <bound method BeautifulSoup.endData of <html><body><p>aabb</p></body></html>>
58、extract <bound method PageElement.extract of <html><body><p>aabb</p></body></html>>
59、fetchNextSiblings <bound method PageElement.find_next_siblings of <html><body><p>aabb</p></body></html>>
60、fetchParents <bound method PageElement.find_parents of <html><body><p>aabb</p></body></html>>
61、fetchPrevious <bound method PageElement.find_all_previous of <html><body><p>aabb</p></body></html>>
62、fetchPreviousSiblings <bound method PageElement.find_previous_siblings of <html><body><p>aabb</p></body></html>>
63、find <bound method Tag.find of <html><body><p>aabb</p></body></html>>
64、findAll <bound method Tag.find_all of <html><body><p>aabb</p></body></html>>
65、findAllNext <bound method PageElement.find_all_next of <html><body><p>aabb</p></body></html>>
66、findAllPrevious <bound method PageElement.find_all_previous of <html><body><p>aabb</p></body></html>>
67、findChild <bound method Tag.find of <html><body><p>aabb</p></body></html>>
68、findChildren <bound method Tag.find_all of <html><body><p>aabb</p></body></html>>
69、findNext <bound method PageElement.find_next of <html><body><p>aabb</p></body></html>>
70、findNextSibling <bound method PageElement.find_next_sibling of <html><body><p>aabb</p></body></html>>
71、findNextSiblings <bound method PageElement.find_next_siblings of <html><body><p>aabb</p></body></html>>
72、findParent <bound method PageElement.find_parent of <html><body><p>aabb</p></body></html>>
73、findParents <bound method PageElement.find_parents of <html><body><p>aabb</p></body></html>>
74、findPrevious <bound method PageElement.find_previous of <html><body><p>aabb</p></body></html>>
75、findPreviousSibling <bound method PageElement.find_previous_sibling of <html><body><p>aabb</p></body></html>>
76、findPreviousSiblings <bound method PageElement.find_previous_siblings of <html><body><p>aabb</p></body></html>>
77、find_all <bound method Tag.find_all of <html><body><p>aabb</p></body></html>>
78、find_all_next <bound method PageElement.find_all_next of <html><body><p>aabb</p></body></html>>
79、find_all_previous <bound method PageElement.find_all_previous of <html><body><p>aabb</p></body></html>>
80、find_next <bound method PageElement.find_next of <html><body><p>aabb</p></body></html>>
81、find_next_sibling <bound method PageElement.find_next_sibling of <html><body><p>aabb</p></body></html>>
82、find_next_siblings <bound method PageElement.find_next_siblings of <html><body><p>aabb</p></body></html>>
83、find_parent <bound method PageElement.find_parent of <html><body><p>aabb</p></body></html>>
84、find_parents <bound method PageElement.find_parents of <html><body><p>aabb</p></body></html>>
85、find_previous <bound method PageElement.find_previous of <html><body><p>aabb</p></body></html>>
86、find_previous_sibling <bound method PageElement.find_previous_sibling of <html><body><p>aabb</p></body></html>>
87、find_previous_siblings <bound method PageElement.find_previous_siblings of <html><body><p>aabb</p></body></html>>
88、format_string <bound method PageElement.format_string of <html><body><p>aabb</p></body></html>>
89、get <bound method Tag.get of <html><body><p>aabb</p></body></html>>
90、getText <bound method Tag.get_text of <html><body><p>aabb</p></body></html>>
91、get_text <bound method Tag.get_text of <html><body><p>aabb</p></body></html>>
92、handle_data <bound method BeautifulSoup.handle_data of <html><body><p>aabb</p></body></html>>
93、handle_endtag <bound method BeautifulSoup.handle_endtag of <html><body><p>aabb</p></body></html>>
94、handle_starttag <bound method BeautifulSoup.handle_starttag of <html><body><p>aabb</p></body></html>>
95、has_attr <bound method Tag.has_attr of <html><body><p>aabb</p></body></html>>
96、has_key <bound method Tag.has_key of <html><body><p>aabb</p></body></html>>
97、index <bound method Tag.index of <html><body><p>aabb</p></body></html>>
98、insert <bound method PageElement.insert of <html><body><p>aabb</p></body></html>>
99、insert_after <bound method BeautifulSoup.insert_after of <html><body><p>aabb</p></body></html>>
100、insert_before <bound method BeautifulSoup.insert_before of <html><body><p>aabb</p></body></html>>
101、new_string <bound method BeautifulSoup.new_string of <html><body><p>aabb</p></body></html>>
102、new_tag <bound method BeautifulSoup.new_tag of <html><body><p>aabb</p></body></html>>
103、nextGenerator <bound method PageElement.nextGenerator of <html><body><p>aabb</p></body></html>>
104、nextSiblingGenerator <bound method PageElement.nextSiblingGenerator of <html><body><p>aabb</p></body></html>>
105、object_was_parsed <bound method BeautifulSoup.object_was_parsed of <html><body><p>aabb</p></body></html>>
106、parentGenerator <bound method PageElement.parentGenerator of <html><body><p>aabb</p></body></html>>
107、parserClass <class 'bs4.BeautifulSoup'>
108、parser_class <class 'bs4.BeautifulSoup'>
109、popTag <bound method BeautifulSoup.popTag of <html><body><p>aabb</p></body></html>>
110、prettify <bound method Tag.prettify of <html><body><p>aabb</p></body></html>>
111、previousGenerator <bound method PageElement.previousGenerator of <html><body><p>aabb</p></body></html>>
112、previousSiblingGenerator <bound method PageElement.previousSiblingGenerator of <html><body><p>aabb</p></body></html>>
113、pushTag <bound method BeautifulSoup.pushTag of <html><body><p>aabb</p></body></html>>
114、recursiveChildGenerator <bound method Tag.recursiveChildGenerator of <html><body><p>aabb</p></body></html>>
115、renderContents <bound method Tag.renderContents of <html><body><p>aabb</p></body></html>>
116、replaceWith <bound method PageElement.replace_with of <html><body><p>aabb</p></body></html>>
117、replaceWithChildren <bound method PageElement.unwrap of <html><body><p>aabb</p></body></html>>
118、replace_with <bound method PageElement.replace_with of <html><body><p>aabb</p></body></html>>
119、replace_with_children <bound method PageElement.unwrap of <html><body><p>aabb</p></body></html>>
120、reset <bound method BeautifulSoup.reset of <html><body><p>aabb</p></body></html>>
121、select <bound method Tag.select of <html><body><p>aabb</p></body></html>>
122、select_one <bound method Tag.select_one of <html><body><p>aabb</p></body></html>>
123、setup <bound method PageElement.setup of <html><body><p>aabb</p></body></html>>
124、unwrap <bound method PageElement.unwrap of <html><body><p>aabb</p></body></html>>
125、wrap <bound method PageElement.wrap of <html><body><p>aabb</p></body></html>>

评论列表( 0 )

你可以在登录后,发表评论

11_float_left_people 11_float_left_close