Jump to content
UBot Underground

Can't find Google search box error...


Recommended Posts

Hi,

 

One of the bots I'm working on at the moment is to check the rankings for some of my sites.  I am getting an error which seems to happen at random though and I've no idea why.  I navigate to Google (with wait for page to load set) and then I wait for element <name=q> with a 60 seconds timeout to make sure the search box is there before searching.

 

I could do thousands of searches and never get an error doing it this way.  Yet, randomly it will just not be able to find the search box at all...The page is loaded fine and I can see that the element has appeared so I've literally no idea why it is doing this.

 

I created a loop for after it timesout to keep trying to load Google again until the element appears, it's made no difference though.

 

 

If anyone could help me understand why my bot keeps doing this, that would be great!

 

:)

Link to post
Share on other sites

After to many searches google will present a captcha. Not sure if that's the problem you are facing? 

Do you use the browser or http / sockets? 

 

So what does it show in the browser? Do you have some screenshots?

 

Dan

Link to post
Share on other sites

There is a long enough delay between searches so it isn't a captcha issue.  I am using browser.  It just looks the way it normally does when Google has loaded.  The search box is definitely visible.

 

Thanks for the reply!

 

:)

Link to post
Share on other sites

I would say that its because you are using <name=q> as the wait for element...  Sometimes google uses a different name element.

 

Try using this instead:

wait for element(<action="/search">, "", "Appear")

Link to post
Share on other sites

You don't have to use the search box either, you can add the keyword into the URL directly and then go from there. Just perform a search and you will see where to add in the keyword and replace spaces with +

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...