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

ranunculus

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ranunculus

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ranunculus

Another Web crawler running with Amazon SQS and ElastiCache(Redis). You need a worker which is available at GitHub.

Installation

Add this line to your application's Gemfile:

gem 'ranunculus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ranunculus

Usage

require 'aws-sdk'
require 'redis'
require 'ranunculus'

sqs = Aws::SQS::Client.new(
  access_key_id: ENV['ACCESS_KEY_ID'],
  secret_access_key: ENV['SECRET_ACCESS_KEY'],
  region: 'ap-northeast-1'
)
redis = Redis.new(:host => "localhost", :port => 6379, :db => 0)

URL_QUEUE_URL = "https://sqs.ap-northeast-1.amazonaws.com/12345/UrlQueue"
RESULT_QUEUE_URL = "https://sqs.ap-northeast-1.amazonaws.com/12345/ResultQueue"

c = Ranunculus::Crawler.new(sqs, redis, URL_QUEUE_URL, RESULT_QUEUE_URL)

page = Ranunculus::Page.new("http://www.yahoo.com")
c.on_every_page do |page|
  puts page.url
end
c.start(page, 1, "Ranunculus")

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/k-kawa/ranunculus-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

FAQs

Package last updated on 10 Apr 2016

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