Get Goolge Result

Hi

i wanna write simple code like this :

puts “Please Enter you word for search in Google.com:”
x=gets
{
}

please help me what should i do ?

any simple code anyone has please put here for me
or any information has please tell me

thank you so mach

2010/2/19 Sajjad S. [email protected]:

Hi
i wanna write simple code like this :
puts “Please Enter you word for search in Google.com:”
x=gets

If you just want that Google spits the HTML result, you can use
something like

require “open-uri”

puts “Please Enter you word for search in Google.com:”
puts open(“http://www.google.com/search?q="+gets.split.join("+”)).read

Eustáquio Rangel wrote:

2010/2/19 Sajjad S. [email protected]:

Hi
i wanna write simple code like this :
puts “Please Enter you word for search in Google.com:”
x=gets

If you just want that Google spits the HTML result, you can use
something like

require “open-uri”

puts “Please Enter you word for search in Google.com:”
puts open(“http://www.google.com/search?q="+gets.split.join("+”)).read

no i wanna just show me result link

pleaseee hellppppppp meeeeeee

i neeedddddddddddddddddddd

no i wanna just show me result link
pleaseee hellppppppp meeeeeee

What result link? You can have thousands of links on the search result.

2010/2/19 Sajjad S. [email protected]:

see here :
http://www.google.co.in/#hl=en&source=hp&q=Ruby&btnG=Google+Search&meta=&aq=f&oq=Ruby&fp=e24c1ca3843ba2b2
i wanna just show me result of link

Did you just run the code I sent you?

Eustáquio Rangel wrote:

2010/2/19 Sajjad S. [email protected]:

see here :
http://www.google.co.in/#hl=en&source=hp&q=Ruby&btnG=Google+Search&meta=&aq=f&oq=Ruby&fp=e24c1ca3843ba2b2
i wanna just show me result of link

Did you just run the code I sent you?

what should i do ?
i need the code?

Eustáquio Rangel wrote:

no i wanna just show me result link
pleaseee hellppppppp meeeeeee

What result link? You can have thousands of links on the search result.

see here :
http://www.google.co.in/#hl=en&source=hp&q=Ruby&btnG=Google+Search&meta=&aq=f&oq=Ruby&fp=e24c1ca3843ba2b2

i wanna just show me result of link

pleaseeeeeeeeeeeeee

Matt L. wrote:

On Sat, 20 Feb 2010, Sajjad S. wrote:

Eustáquio Rangel wrote:

2010/2/19 Sajjad S. [email protected]:

see here :
http://www.google.co.in/#hl=en&source=hp&q=Ruby&btnG=Google+Search&meta=&aq=f&oq=Ruby&fp=e24c1ca3843ba2b2
i wanna just show me result of link

Did you just run the code I sent you?

what should i do ?
i need the code?

Find someone else to do your homework for you?

– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.

see
when write RUBy in google and submit Search in google
google will bring some link for search ok ?
now i want take the links !!!
now what should i do ?

2010/2/19 Sajjad S. [email protected]:

see
when write RUBy in google and submit Search in google
google will bring some link for search ok ?
now i want take the links !!!
now what should i do ?

You should run the code I sent you. If you can’t do that, I give up. :slight_smile:

Eustáquio Rangel wrote:

2010/2/19 Sajjad S. [email protected]:

see
when write RUBy in google and submit Search in google
google will bring some link for search ok ?
now i want take the links !!!
now what should i do ?

You should run the code I sent you. If you can’t do that, I give up. :slight_smile:

i cant
i dont have code
i want the code
please if you have give me please

thank youuuuuuuuuuuu

i needdddddddd

pleassssssssssssss

On 2010-02-19, Sajjad S. [email protected] wrote:

i cant
i dont have code
i want the code
please if you have give me please

You were provided with the code. If you can’t figure out how to obtain
the code that was already given to you, I don’t think anyone here can
help
you.

Find someone who knows how to use a web browser and have them walk you
through it.

-s

On Sat, 20 Feb 2010, Sajjad S. wrote:

Eustáquio Rangel wrote:

2010/2/19 Sajjad S. [email protected]:

see here :
http://www.google.co.in/#hl=en&source=hp&q=Ruby&btnG=Google+Search&meta=&aq=f&oq=Ruby&fp=e24c1ca3843ba2b2
i wanna just show me result of link

Did you just run the code I sent you?

what should i do ?
i need the code?

Find someone else to do your homework for you?

– Matt
It’s not what I know that counts.
It’s what I can remember in time to use.

On 2/19/2010 11:35 AM, Seebs wrote:

Find someone who knows how to use a web browser and have them walk you
through it.

-s

We’ve been through this same dance with (I’m betting) the same person
quite recently.
See the thread at: http://www.ruby-forum.com/topic/201233#new

There’s no point in continuing to reply. Just ignore him/her at let it
die.

On Sat, Feb 20, 2010 at 02:20:57AM +0900, Sajjad S. wrote:

i needdddddddd

pleassssssssssssss

Eustáquio Rangel gave you an example of how to use the OpenURI module,
which would probably be the first step toward accomplishing what you
want
to do. The next would be to filter the results, which may be
accomplished in a number of ways, but the simplest (and most hackish)
would probably be to use a regular expression. The rest of this should
be left as an exercise for you, because this mailing list, newsgroup,
or forum (depending on how you’re accessing it) is for people who know
or
want to learn Ruby, and not so much for people who just want to get
other
people to do their work for them.

I don’t know whether you are socially handicapped somehow so that you do
not realize the bad impression you are giving, and I don’t know whether
you really cannot understand that someone has already provided you the
beginnings of an answer to your apparent coding issue, but I figured I’d
make the effort of trying to explain to you how you can make use of this
information in case the problem is one of communication rather than of
you wanting someone else to do your homework for you. If this is not
enough, though, I think you’re probably on your own.

using 1.9.1 (I upgraded, finally, thanks to rvm!)

require ‘mechanize’

internet = Mechanize.new
google = internet.get ‘http://www.google.com
form = google.forms.first
form.q = ‘Ruby’
results = form.submit
results.search(’//h3/a[@class=“l”]’).each { |link| puts link.content }

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs