vifreefly / kimuraframework

Kimurai is a modern web scraping framework written in Ruby which works out of box with Headless Chromium/Firefox, PhantomJS, or simple HTTP requests and allows to scrape and interact with JavaScript rendered websites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some minor warnings when using kimurai

rubyFeedback opened this issue · comments

Hey there,

Sorry to bother you.

A few harmless warnings are issued when run under -w

Reason I report this is because I am quite pedantic, so I have -w on all the time.

This then pulls these warnings into my projects.

I know I can silence them, e. g. via $VERBOSE and probably the Warning module,
but I am trying the lazy approach and report them here. Feel free to disregard
this please. :-)

/.gem/gems/kimurai-1.4.0/lib/kimurai/browser_builder.rb:12: warning: assigned but unused variable - e
/.gem/gems/kimurai-1.4.0/lib/kimurai/base_helper.rb:11: warning: assigned but unused variable - uri
/.gem/gems/kimurai-1.4.0/lib/kimurai/base_helper.rb:12: warning: assigned but unused variable - e
/.gem/gems/kimurai-1.4.0/lib/kimurai/base.rb:33: warning: instance variable @run_info not initialized

(For local but unused variables, they can either be removed, or if you want to keep them, a leading
_ such as _uri would work. For uninitialized instance variables, I typically bundle them all in a method
called reset() where they are initialized to nil. That silences that warning.

I use kimurai to query javascript-heavy websites that do not easily allow us to parse the result. For
that purpose it works very well. For example I use kimurai to query the remote world-time, from a
website that uses javascript. (God I hate javascript sooo much though ...)