資源簡介
參考資料:
1, BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/
2, Martin Fowler: Domain-Specific Languages.
3, Internal-DSL: http://en.wikipedia.org/wiki/Domain-specific_language
4, Fluent Interface: http://en.wikipedia.org/wiki/Fluent_interface
代碼片段和文件信息
“““Beautiful?Soup
Elixir?and?Tonic
“The?Screen-Scraper‘s?Friend“
http://www.crummy.com/software/BeautifulSoup/
Beautiful?Soup?parses?a?(possibly?invalid)?xml?or?HTML?document?into?a
tree?representation.?It?provides?methods?and?Pythonic?idioms?that?make
it?easy?to?navigate?search?and?modify?the?tree.
A?well-formed?xml/HTML?document?yields?a?well-formed?data
structure.?An?ill-formed?xml/HTML?document?yields?a?correspondingly
ill-formed?data?structure.?If?your?document?is?only?locally
well-formed?you?can?use?this?library?to?find?and?process?the
well-formed?part?of?it.
Beautiful?Soup?works?with?Python?2.2?and?up.?It?has?no?external
dependencies?but?you‘ll?have?more?success?at?converting?data?to?UTF-8
if?you?also?install?these?three?packages:
*?chardet?for?auto-detecting?character?enco
評論
共有 條評論