原文地址:
https://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html
原文 by Leonard Richardson (leonardr@segfault.org)
翻译 by Richie Yan (richieyan@gmail.com)
###如果有些翻译的不准确或者难以理解,直接看例子吧。###
Beautiful Soup 是用Python写的一个HTML/XML的解析器,它可以很好的处理不规范标记并生成剖析树(parse tree)。 它提供简单又常用的导航(navigating),搜索以及修改剖析树的操作。它可以大大节省你的编程时间。 对于Ruby,使用Rubyful Soup。
- Navigating 剖析树
- Searching 剖析树
- Searching 剖析树内部
findNextSiblings(name, attrs, text, limit, **kwargs)
andfindNextSibling(name, attrs, text, **kwargs)
findPreviousSiblings(name, attrs, text, limit, **kwargs)
andfindPreviousSibling(name, attrs, text, **kwargs)
findAllNext(name, attrs, text, limit, **kwargs)
andfindNext(name, attrs, text, **kwargs)
findAllPrevious(name, attrs, text, limit, **kwargs)
andfindPrevious(name, attrs, text, **kwargs)