frankthetank 0 Posted May 29, 2014 Report Share Posted May 29, 2014 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! Quote Link to post Share on other sites
Bot-Factory 602 Posted May 29, 2014 Report Share Posted May 29, 2014 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 Quote Link to post Share on other sites
frankthetank 0 Posted May 29, 2014 Author Report Share Posted May 29, 2014 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! Quote Link to post Share on other sites
a2mateit 395 Posted May 29, 2014 Report Share Posted May 29, 2014 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") Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 29, 2014 Report Share Posted May 29, 2014 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 + Quote Link to post Share on other sites
frankthetank 0 Posted May 30, 2014 Author Report Share Posted May 30, 2014 Thank you all for the suggestions. I have changed my bot and I'm currently testing. Really appreciate the help... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.