【文件属性】:
文件名称:web_scraper:Web Scraper 是一个通过抓取静态站点并使用数据作为模型来构建 API 的库
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-14 13:43:14
Ruby
网络爬虫
Web Scraper 是一个通过抓取静态站点并使用数据作为模型来构建 API 的库。
安装
gem install web_scraper
require 'web_scraper'
用法
例子
require 'web_scraper'
class Article < WebScraper
resource 'http://hbswk.hbs.edu/topics/it.html'
base css : '.tile-medium'
property :title , xpath : './/h4/a/text()'
property :date , xpath : './/li[1]/text()'
property :category , xpath : './/li[2]/a/text()'
property
【文件预览】:
web_scraper-master
----web_scraper.gemspec(572B)
----LICENSE(1KB)
----Gemfile(47B)
----.gitignore(24B)
----lib()
--------web_scraper.rb(7KB)
----README.md(4KB)