Giter Site home page Giter Site logo

google-search's People

Contributors

0zguner avatar hirocaster avatar jikkujose avatar samsheff avatar tj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-search's Issues

Warning: instance variable @each_response not initialized

I'm working on a feature for the faker gem that would utilize this gem, and anytime I run the tests for it, it prints this message a lot.

I was able to solve it by declaring @each_response as nil in the initialize, but would love feedback from others as well

Possible New Bug With "site:foo.*"

I'm trying to simulate a search like this:

https://www.google.com/search?q=site:xapo.*
Results: xapo.com xapo.ch xapo.de xapo.info xapo.at xpo.co.pt etc...

What I have is something like this:

q = Google::Search::Web.new query: "site:xapo.*"

q.get_uri
# http://www.google.com/uds/GwebSearch?start=0&rsz=large&hl=en&key=notsupplied&v=1.0&q=site%3Axapo.%2A&filter=1

q.take 100
# Results: xapo.com foo.xapo.com etc...

The results are way different. What am I doing wrong?

Ruby gem Error “Google is not a module/class”

When I first require 'roo' and then require 'google-search' I get an error

TypeError: Google is not a module

Again, I first require 'google-search' and then require 'roo' I get this error

TypeError: Google is not a class

See below for what actually happened on irb

{12:30}[1.9.3]~ ➭ irb
1.9.3-p0 :001 > require 'roo'
=> true
1.9.3-p0 :002 > require 'google-search'
TypeError: Google is not a module
from /home/sagar/.rvm/gems/ruby-1.9.3-p0/gems/google-search-1.0.3/lib/google-search/version.rb:2:in <top (required)>' from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:inrequire'
from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in require' from /home/sagar/.rvm/gems/ruby-1.9.3-p0/gems/google-search-1.0.3/lib/google-search.rb:26:in<top (required)>'
from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in require' from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:inrescue in require'
from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in require' from (irb):2 from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in

'
1.9.3-p0 :003 > exit
{12:30}[1.9.3]~ ➭ irb
1.9.3-p0 :001 > require 'google-search'
=> true
1.9.3-p0 :002 > require 'roo'
TypeError: Google is not a class
from /home/sagar/.rvm/gems/ruby-1.9.3-p0/gems/roo-1.10.1/lib/roo/google.rb:7:in <top (required)>' from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:inrequire'
from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in require' from /home/sagar/.rvm/gems/ruby-1.9.3-p0/gems/roo-1.10.1/lib/roo.rb:74:in<top (required)>'
from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in require' from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:inrescue in require'
from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in require' from (irb):2 from /home/sagar/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in'

Some searches do not work

It seems some searches do not get results. When searching for 8715664020388 i get no results through google-search gem. When I google it myself, I do get search results. I encounter the problem with a lot of queries.

How do you prefer to have proxy support?

Hi TJ,

I've checked out your gem because I need to create a toy metasearch engine, the thing is that I need to have proxy support to pass through my university network, and I was about to create a patch.

As you already know, adding proxy support is trivial but, in order to keep the excellent usability of the API I was wondering which one of the following approaches would you prefer me to follow:

  • On the one side, I can keep the stateless, self-containing style of the queries and do what's necessary to allow something like this:
Google::Search::Web.new(:query => 'naked celebrities',  :proxy => 'http://proxy.uniovi.es:8888').each do |web_result|
   #... Whatever
 end
  • On the other side, it could be interesting to have a means of configuring a proxy for all the queries, as it is very likely that someone needing a proxy to submit a query, would need it to submit all of them:
Google::Search::Defaults.set(:proxy, 'http://proxy.uniovi.es:8888')
Google::Search::Web.new(:query => 'naked celebrities').each{ | web_result | ... }
Google::Search::Images.new(:query => 'angelina jolie').each{ | image | ... }
Google::Search::Local.new(:query => 'foo bar').each{ |place| ... }

Both alternatives can be complementary.

Do you think that having a Defaults object would break your API orthogonality? having it would ease the case of needing a proxy, which IMHO is not that uncommon, but I would like to know your opinion.

Regards,

Miguel

cannot load such file -- google-search

I am trying to require google-search gem inside a helper module, but getting the following error on require cannot load such file -- google-search. This is working well at the local system, but causing problems at the production server. Though I can find the gem when I run gem list. Unable to figure out the problem.

module TestHelper
   require 'google-search'

end

Google::Search::News is not displaying any news articles. Please help.

Before it was Image, now even news articles are NOT being displayed from Google::Search::News. Please somebody help here. I m doing my final year project and desperately need some help. I tried it on irb. The result was NIL.

2.3.0 :008 > Google::Search::News.new(query: "Panama Papers")
`2.3.0 :009 > results = _
=> #<Google::Search::News:0x00000000e597c8 @relative_to=nil, @edition=nil, @order_by=nil, @type=:news, @Version=1.0, @offset=0, @SiZe=:large, @language=:en, @query="Panama Papers", @api_key=:notsupplied, @options={}>

2.3.0 :010 > results.each do |result|
2.3.0 :011 >     puts result
2.3.0 :012?>   end

=> nil `

Google::Search::Image Returning 0 results

Over the last two days Google::Search::Image.new(:query => "anything") has been returning 0 results. I haven't touched any part of my google search code, and the results used to return perfectly. Google::Search::Web also still works. Is this specific to my app or has something happened with Google? Thanks for your help, great gem!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.