gpt4 book ai didi

python - Beautiful Soup for Ruby 最接近的等价物是什么?

转载 作者:太空狗 更新时间:2023-10-29 17:17:07 25 4
gpt4 key购买 nike

我喜欢 Python 中的 Beautiful Soup 抓取库。它只是工作。 Ruby 中是否有一个近似的等价物?

最佳答案

Nokogiri是另一个 HTML/XML 解析器。根据 these benchmarks,它比 hpricot 更快. Nokogiri 使用 libxml2,是 hpricot 的替代品。它还支持 css3 选择器,这非常好。

编辑:有一个新的基准比较 nokogiri、libxml-ruby、hpricot 和 rexml here .

Ruby Toolbox在 HTML 解析器上有一个类别 here .

关于python - Beautiful Soup for Ruby 最接近的等价物是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/640068/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com