Python_Notes
search
⌘Ctrlk
Python_Notes
  • 介绍
  • Basic Syntax
  • Standard Modules
  • Python Web
  • Python BigData
  • Python Spider
    • 反爬虫
    • requests
    • BeautifulSoup
      • 对象
      • 遍历文档树
      • 搜索文档树
      • 修改文档树
        • 修改tag的名称和属性
        • 修改 .string
        • append()
        • NavigableString() 和 .new_tag()
        • insert()
        • insert_before() 和 insert_after()
        • clear()
        • extract()
        • decompose()
        • replace_with()
        • wrap()
        • unwrap()
    • selenium
    • scrapy
  • Python Hacker
  • Other Packages
  • Debug
  • inside Packages
  • Python APP
gitbookPowered by GitBook
block-quoteOn this pagechevron-down
  1. Python Spiderchevron-right
  2. BeautifulSoup

修改文档树

修改tag的名称和属性chevron-right修改 .stringchevron-rightappend()chevron-rightNavigableString() 和 .new_tag()chevron-rightinsert()chevron-rightinsert_before() 和 insert_after()chevron-rightclear()chevron-rightextract()chevron-rightdecompose()chevron-rightreplace_with()chevron-rightwrap()chevron-rightunwrap()chevron-right
Previousfind_all_previous() 和 find_previous()chevron-leftNext修改tag的名称和属性chevron-right

Last updated 7 years ago