Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botch

  • 0.1.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Botch

Build Status

Botch is a simple DSL for quickly creating web crawlers.

Inspired by Sinatra.

Japanese

Installation

add this line to your Gemfile.

gem 'botch'

or

$ gem install botch

Usage

require 'lib/botch'
require 'kconv'
require 'rack'

class SampleBotch < Botch::Base
  set :user_agent, "SampleBotch"

  helpers do
    def h(str)
      Rack::Utils.escape_html(str)
    end
  end

  filter :example, :map => "example.com" do
    status == 200
  end

  rule :example, :map => /example\.com/ do
    h(body.toutf8)
  end
end

if $0 == __FILE__
  SampleBotch.run("http://example.com/") do |response|
    puts response
  end
end

TODO

  • RSpec
  • Documentation

Contributing to Botch

  1. fork the project.
  2. create your feature branch. (git checkout -b my-feature)
  3. commit your changes. (git commit -am 'commit message.')
  4. push to the branch. (git push origin my-feature)
  5. send pull request.

License

MIT

FAQs

Package last updated on 08 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc