Sha256: a1f84a1f941d020436b60e9434eda79e300a0ec6f6b485ab0850f2b98a503382
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
require "thor" require "json" module Tansaku class CLI < Thor desc "crawl URL", "Crawl a given URL" method_option :additional_list, desc: "Path to the file which includes additonal paths to crawl" method_option :threads, type: :numeric, desc: "Number of threads to use" method_option :user_agent, type: :string, desc: "User-Agent parameter to use" def crawl(url) params = options.compact.map { |k, v| [k.to_sym, v] }.to_h crawler = Crawler.new(url, params) results = crawler.crawl puts results.to_json end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tansaku-0.1.0 | lib/tansaku/cli.rb |