xp:用于直观网页抓取的 Ruby gem

时间:2021-07-05 21:34:04
【文件属性】:
文件名称:xp:用于直观网页抓取的 Ruby gem
文件大小:347KB
文件格式:ZIP
更新时间:2021-07-05 21:34:04
Ruby 经验值 Ruby gem 向 String 类添加了一些方法,用于直观的 HTML/XML 抓取。 安装 $ gem install xp 用法 在命令行使用中, xp过滤通过 STDIN 提供的 HTML/XML 文档: $ curl -s ' https://news.ycombinator.com ' | xp --text ' //td[class="title"]/a ' 或者 $ curl -s ' https://news.ycombinator.com ' | xp --text ' td.title > a ' 需要( require 'xp' )在 Ruby 脚本中使用的 gem。 以下一位班轮可以在其主页下载所有 Dribbble 镜头: 'https://dribbble.com/' . css ( '.dribbble-link img' ) . xpa
【文件预览】:
xp-master
----.gitignore(10B)
----xp.gemspec(566B)
----bin()
--------xp(312B)
----pkg()
--------xp-2.0.2.gem(176KB)
--------xp-0.0.1.gem(4KB)
--------xp-2.0.1.gem(89KB)
--------xp-0.0.2.gem(5KB)
--------xp-2.0.0.gem(46KB)
--------xp-1.0.0.gem(5KB)
----LICENSE.txt(1KB)
----research()
--------bb_parser.rb(101B)
--------y.htm(221KB)
--------load.rb(45B)
--------interface.rb(205B)
--------selector.rb(151B)
--------attribute_extractor.rb(124B)
----README.markdown(2KB)
----lib()
--------xp.rb(1KB)
--------user_agents.rb(650B)
----Gemfile(109B)
----Rakefile(28B)
----test()
--------test_content.html(27KB)
--------xp_test.rb(2KB)
--------test_helper.rb(225B)
----Gemfile.lock(243B)

网友评论