screencap
screencap copied to clipboard
A gem to screencap webpages in ruby. Uses Phantom.js under the hood.
I might be missing it, but i don't see an easy way to pass the --ignore-ssl-errors option to the phantomjs.rb wrapper and have it execute. Is this an upstream issue...
In phantomjs versions > 2.0 `phantom.args` is no longer supported, and we should use `system.args` instead. When I installed screencap on my dev machine, it just worked, but somehow when...
For some reason the jQuery URL inject started not to load for me causing the callback to not run and the window to not be resized anymore. It isn't really...
In some cases it's more efficient to use JPEG format instead of PNG. But there is no option in gem API to define JPEG quality. Default value produce blurry pictures.
I am using the code found under "usage" on the github page for screencap. It works for most of the sites. But as soon as i hit a site with...
I am trying to take a screenshot with a selector for capture the specific element: ``` rb irb(main):016:0> f = Screencap::Fetcher.new('https://ubit.info/ssut') irb(main):027:0> f.fetch(output: 'ssut.png',div: '#music_list') url=https%3A%2F%2Fubit.info%2Fssut output=ssut.png div=#music_list => #...
screencap-0.1.1.gem phantomjs-1.9.7.1.gem ``` ruby require 'screencap' f = Screencap::Fetcher.new('http://google.com') screenshot = f.fetch NameError: uninitialized constant Screencap::Phantom::CGI from /Volumes/Data/mario/.rvm/gems/ruby-2.0.0-p451/gems/screencap-0.1.1/lib/screencap/phantom.rb:7:in `rasterize' from /Volumes/Data/mario/.rvm/gems/ruby-2.0.0-p451/gems/screencap-0.1.1/lib/screencap/fetcher.rb:24:in `raster' from /Volumes/Data/mario/.rvm/gems/ruby-2.0.0-p451/gems/screencap-0.1.1/lib/screencap/fetcher.rb:9:in `fetch' from (irb):3 from /Volumes/Data/mario/.rvm/rubies/ruby-2.0.0-p451/bin/irb:12:in `'...
I've tried numerous variations: ``` require 'screencap' ``` ...and then each of the following: ``` Screencap.any_instance.stub(:fetch).and_return(File.open("#{Rails.root}/spec/support/stubbed_image.png")) Fetcher::Screencap.any_instance.stub(:fetch).and_return(File.open("#{Rails.root}/spec/support/stubbed_image.png")) Screencap.stub(:fetch).and_return(File.open("#{Rails.root}/spec/support/stubbed_image.png")) Fetcher::Screencap(:fetch).and_return(File.open("#{Rails.root}/spec/support/stubbed_image.png")) ``` But I get various errors saying the various Rspec stubbing...
@maxwell Screencap requires error class to , managing exceptions. Is any plans to do add this?
Hello, I have an error when pushing my rails application in production environment (CentOS 6 - Apache) : ActionView::Template::Error (Permission denied - /.phantomjs) But phantomjs is installed on my server....