RayMue 0 Posted August 19, 2011 Report Share Posted August 19, 2011 Hey Guys, for several hours I am trying to create a bot which clicks on the google results of my homepage. I enter a keyword in the ui text box and submit this to google. Thats ok so far. But then the Bot should select the result which links my domain. I tried chose attribute <A class="l noline" onmousedown="" href="/url?sa=t&source=web&cd=1&ved=0CCAQFjAA&url=http%3A%2F%2Fwww.mydomain.com*or<A class="l noline" onmousedown="" href="http://www.google.de/url?sa=t&source=web&cd=1&ved=0CCAQFjAA&url=http%3A%2F%2Fwww.madomain.com%*but all attemps faild. Any suggestion ? Quote Link to post Share on other sites
UBotBuddy 331 Posted August 19, 2011 Report Share Posted August 19, 2011 Can you scrape the innertext of the link that you need? If so then use that text that you scrape for the criteria of the chose by attribut and then issue the click chosen. Quote Link to post Share on other sites
RayMue 0 Posted August 25, 2011 Author Report Share Posted August 25, 2011 Can you scrape the innertext of the link that you need? If so then use that text that you scrape for the criteria of the chose by attribut and then issue the click chosen. I dont know how to. I'll try it in other words. 1. Use google Germany http://www.google.de/2. Search for "polar rcx5"3. I want the bot to click on our page which is: www.sportuhren-profi.de/triathlon/353-polar-rcx5.html I tried to set a variable with scrape choosen attribute, attribute innerhtml, but how to assign the innerhtml *sportuhren-profi.de ? Quote Link to post Share on other sites
Praney Behl 314 Posted August 31, 2011 Report Share Posted August 31, 2011 Are you using Ubot V3.5 or V4?I maybe able to help you with this. Praney Quote Link to post Share on other sites
RayMue 0 Posted September 1, 2011 Author Report Share Posted September 1, 2011 Now V4 (sincs 10 minutes) Quote Link to post Share on other sites
Praney Behl 314 Posted September 1, 2011 Report Share Posted September 1, 2011 Here is a sample for Ver 4.x clear list(%links) navigate("http://www.google.com", "Wait") type text(<name="q">, "Dog food", "Standard") click(<name="btnG">, "Left Click", "No") wait(3) add list to list(%links, $scrape attribute(<class="l">, "innertext"), "Delete", "Global") click(<innertext="polar rcx5">, "Left Click", "No") Hope this help. Praney 4 Quote Link to post Share on other sites
imihandstand 0 Posted September 7, 2011 Report Share Posted September 7, 2011 Here is a sample for Ver 4.x clear list(%links) navigate("http://www.google.com", "Wait") type text(<name="q">, "Dog food", "Standard") click(<name="btnG">, "Left Click", "No") wait(3) add list to list(%links, $scrape attribute(<class="l">, "innertext"), "Delete", "Global") click(<innertext="polar rcx5">, "Left Click", "No") Hope this help. PraneyI have the same question as RayMue, but unfortunately this code given from Praney★Behl isn't working for me (uBot 4 Pro) :S Quote Link to post Share on other sites
Praney Behl 314 Posted September 8, 2011 Report Share Posted September 8, 2011 I have the same question as RayMue, but unfortunately this code given from Praney★Behl isn't working for me (uBot 4 Pro) :S There is no problem with the code. As I just picked up a title from the page for the search "Dog Food" is "polar rcx5" which may be changed in your case or not exist anymore. you need to pick the title of a page you want to click and replace it with "polar rcx5". Hope it helps. Praney 2 Quote Link to post Share on other sites
Bobby 14 Posted September 8, 2011 Report Share Posted September 8, 2011 @Praney★Behl: Thank you very much for this code! It really works! Quote Link to post Share on other sites
Bobby 14 Posted September 8, 2011 Report Share Posted September 8, 2011 Hm... I tried your code now with "UI text box", but so it isn't working. Here the code: ui text box("Keyword", #keyword_to_search_for) ui text box("Title to click", #title_to_click) clear list(%links) navigate("http://www.google.com", "Wait") type text(<name="q">, #keyword_to_search_for, "Standard") click(<name="btnG">, "Left Click", "No") wait(3) add list to list(%links, $scrape attribute(<class="l">, "innertext"), "Delete", "Global") click(<innertext="#title_to_click">, "Left Click", "No") Everything works fine, but not the last line (it doesn't click the title I wrote into the "title_to_click" box). Quote Link to post Share on other sites
firionicable 0 Posted September 12, 2011 Report Share Posted September 12, 2011 Hm... I tried your code now with "UI text box", but so it isn't working. Here the code: ui text box("Keyword", #keyword_to_search_for) ui text box("Title to click", #title_to_click) clear list(%links) navigate("http://www.google.com", "Wait") type text(<name="q">, #keyword_to_search_for, "Standard") click(<name="btnG">, "Left Click", "No") wait(3) add list to list(%links, $scrape attribute(<class="l">, "innertext"), "Delete", "Global") click(<innertext="#title_to_click">, "Left Click", "No") Everything works fine, but not the last line (it doesn't click the title I wrote into the "title_to_click" box). same here, i have tried this code and i got no luck at all. maybe i have to change something on it to work. thanks for sharing though.. Quote Link to post Share on other sites
RayMue 0 Posted September 12, 2011 Author Report Share Posted September 12, 2011 Was on Holiday - now back !THANK YOU for the code !!! I will test it Quote Link to post Share on other sites
Praney Behl 314 Posted September 12, 2011 Report Share Posted September 12, 2011 Hm... I tried your code now with "UI text box", but so it isn't working. Here the code: Everything works fine, but not the last line (it doesn't click the title I wrote into the "title_to_click" box). same here, i have tried this code and i got no luck at all. maybe i have to change something on it to work. thanks for sharing though.. Guys please look carefully. If you replaced the text with the variable you need to put the variable in {} so it is identified as a variable. here is the code again with a variable:ui text box("Keyword", #keyword_to_search_for) ui text box("Title to click", #title_to_click) clear list(%links) navigate("http://www.google.com", "Wait") type text(<name="q">, #keyword_to_search_for, "Standard") click(<name="btnG">, "Left Click", "No") wait(3) add list to list(%links, $scrape attribute(<class="l">, "innertext"), "Delete", "Global") click(<innertext="{#title_to_click}">, "Left Click", "No") Hope it helps. Praney 2 Quote Link to post Share on other sites
Bobby 14 Posted September 12, 2011 Report Share Posted September 12, 2011 Guys please look carefully. If you replaced the text with the variable you need to put the variable in {} so it is identified as a variable. Hope it helps. PraneyHaha Praney, thank you very much! You're right, but I think I did this in the Node-View. 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.