Project

scrapybara

0.0
No commit activity in last 3 years
No release in over 3 years
[WIP] Ruby library providing DSL for describing custom Web scrapers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.5
>= 0
 Project Readme

Scrapybara

Ruby library providing DSL for describing custom Web scrapers.

Dependencies

PhantomJS — for installation please refer PhantomJS download page.

Installation

git clone https://github.com/OPLZZ/scrapybara.git
cd scrapybara

... install the required rubygems:

bundle install

Usage

You can take a look into examples directory for few annotated examples:

Each definition can be executed by scrapybara binary from bin directory

For example:

bundle exec ./bin/scrapybara examples/job-it.rb

If you run definition in interactive mode, code execution is paused for each #fetch, #extract part of the definition in Pry session. When code is paused, you can debug everything you can do in Pry session.

To continue, press CTRL+D.

To exit, type exit! and press enter.

bundle exec ./bin/scrapybara examples/job-it.rb --interactive

You can run each definition in browser by overriding Capybara driver from command line.

bundle exec ./bin/scrapybara examples/job-it.rb --driver selenium

You can combine previous options, so you can have interactive mode with selenium driver.

bundle exec ./bin/scrapybara examples/job-it.rb --driver selenium --interactive

You can enable debug for interactive mode to add even more breakpoints when definition is executed

bundle exec ./bin/scrapybara examples/job-it.rb --debug --interactive

##Funding Project of Operational Programme Human Resources and Employment No. CZ.1.04/5.1.01/77.00440. The project No. CZ.1.04/5.1.01/77.00440 was funded from the European Social Fund through the Operational Programme Human Resources and Employment and the state budget of Czech Republic.