84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
看文档没怎么弄明白,请各位给个比较直观的描述,顺别说一下这个东西有什么用啊
ringa_lee
NavigableString对象, 用于操纵字符串,如"Page title"和"This is paragraph"。 http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html
官方对这个对象也没有详细描述,不过使用过程中发现,它其实就是python的str对象的继承子类,实际上没区别。不知道楼主对这个遇到了什么问题?
NavigableString按照字面意义上理解为可遍历字符串,是BeautifulSoup对象四种类型tag|NavigableString|BeautifulSoap|Comment中的一种。
NavigableString
BeautifulSoup
tag|NavigableString|BeautifulSoap|Comment
soup.tag.string # 用来获取便签内部的文字内容,通过.string来调用 # 可以通过type()方法查看类型 print type(soup.tag.string) # <class 'bs4.element.NavigableString'>
NavigableString对象, 用于操纵字符串,如"Page title"和"This is paragraph"。 http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html
官方对这个对象也没有详细描述,不过使用过程中发现,它其实就是python的str对象的继承子类,实际上没区别。
不知道楼主对这个遇到了什么问题?
NavigableString
按照字面意义上理解为可遍历字符串,是
BeautifulSoup
对象四种类型tag|NavigableString|BeautifulSoap|Comment
中的一种。