golfer57 0 Posted November 14, 2016 Report Share Posted November 14, 2016 Hello all,i am trying to write a digg.com bot, but have run into this authorization window problem.this is in ubot what is below:i navigate to digg.com>> then submit url (http://digg.com/submit)>>then i populate the url box to submit>> then it wants me authorize Twitter or FB (https://api.twitter.com/oauth/authorize?oauth_token=kwo5sAAAAAAAAT8AAAABWGPvGqs)... this is where my problem is, when i click the twitter button(for example could have been FB button, same thing happens) a second window want to pop up but it is all greyed out. there is nothing in the window, this is the problem, getting that window to show so i can enter the Username and Password and then authorize the twitter app(click that button on the second page), also each time that token changes to something else, so it is only good one time, then it needs a new token, i tried the * in the token, did not like that either.i am totally lost on how to allow that authorization window to show up to put the info (UN and PW) on that page and then click the authorize??? this is my dilemma.Some one please help??? thanks in advancesteve Quote Link to post Share on other sites
Gogetta 263 Posted November 14, 2016 Report Share Posted November 14, 2016 There are a couple of ways you can go about handling this. I guess the easiest way would be to Allow Popups in a new window. allow popups("In New Window") navigate("http://digg.com/submit", "Don\'t Wait") wait for element(<url field>, "", "Appear") type text(<url field>, "http://google.com", "Standard") click($element offset(<login link>, 2), "Left Click", "No") in popup { wait for element(<for="username_or_email">, "", "Appear") comment("Login to twitter here.") wait(5) close page } Quote Link to post Share on other sites
golfer57 0 Posted November 14, 2016 Author Report Share Posted November 14, 2016 Thanks i will give this a try. Quote Link to post Share on other sites
golfer57 0 Posted November 14, 2016 Author Report Share Posted November 14, 2016 Nope did not work, still when i get to the click element, the new window is still grey with no information to input, so that did not work. try it in your ubot, you will then see what i mean, but no luck, i was hopeful.Please give me another suggestion once you see what it is doing on your end.thanks in advance, Quote Link to post Share on other sites
golfer57 0 Posted November 14, 2016 Author Report Share Posted November 14, 2016 here is a image of what is happening when the second authorization window tries to open, this is a twitter authorization window.hope this helps Quote Link to post Share on other sites
Gogetta 263 Posted November 14, 2016 Report Share Posted November 14, 2016 Yes, I tested it in UBot 4 that' why i didn't see the problem you were speaking of in v.5. I'll see what I can do to help. 1 Quote Link to post Share on other sites
golfer57 0 Posted November 14, 2016 Author Report Share Posted November 14, 2016 here is the actual window so you can see what is supposed to be showing up in the ubot window when the bot is running.thanks in advance Quote Link to post Share on other sites
luis carlos 94 Posted November 14, 2016 Report Share Posted November 14, 2016 Works perfect as Gogetta said (V4). Quote Link to post Share on other sites
golfer57 0 Posted November 15, 2016 Author Report Share Posted November 15, 2016 No word yet how to make this work in V5 yet? Man i was hoping. I just dont know where to start, why did i pick something like this to start with, not sure. Seems to work out like that, oh well, will just have to wait it out.Is it bad to have the v5 version of Ubot running? Should i be running on V4? Quote Link to post Share on other sites
UBotBuddy 331 Posted November 15, 2016 Report Share Posted November 15, 2016 Hey Gogetta, Does this work with v5? I believe that is what Steve is running into. Thanks Buddy Quote Link to post Share on other sites
Gogetta 263 Posted November 15, 2016 Report Share Posted November 15, 2016 The code that I posted earlier will work in v.5 if you set the browser to chrome 21.Make sure to restart UBot after you made the changes. 1 Quote Link to post Share on other sites
deliter 203 Posted November 16, 2016 Report Share Posted November 16, 2016 Whilst asking in questions in the forum you should stick to Ubot 4,or at least Ubot 5 Chrome 21,its pretty much what anybody who answers your question will be using,I recently made my first bot with Chrome 49 that works great but its still experimental,Ubot 4/Chrome 21 is a solid rock at this point Quote Link to post Share on other sites
golfer57 0 Posted November 16, 2016 Author Report Share Posted November 16, 2016 I want you to know that i really appreciate all you help and guidance.I took your code and used it with the v5 chrome 21 and yes the popup does come. So now i started to modify the bot.I went in and added a mouse click on the popup window so i could see the fields. I did that and the popup then was in the large window and i could see the UN and PW fields. I then dragged over the elements for UN and PW with text entry and the field would never populate with the UN and PW, nor could i get the authorize app button to work either.I don't know what to do now, i have tried everything that i know what to do but the username and password fields would not populate with the text that i entered. It is like the page is not really there or does not exist. I can click on the popup and the digg.com page comes back and works fine, but not the popup to authorize twitter.Any help in this matter would be greatly appreciated. here is the code that i added.allow popups("In New Window")navigate("http://digg.com/submit","Don\'t Wait")wait for element( ,"","Appear")type text(,"http://google.com","Standard")click($element offset( ,2),"Left Click","No")in popup {wait for element(,"","Appear")plugin command("WindowsCommands.dll", "click mouse", "Untitled Bot* - UBot Studio Stealth Developer Edition", "HwndWrapper[uBot Studio.exe;;e2581cb2-ee12-4fac-bde2-9ffca3211037]", 1286, 239, "Left Click")type text(,"clearmyacne","Standard")type text(,"beartoes","Standard")comment("Login to twitter here.")close page}thanks againSteve Quote Link to post Share on other sites
Gogetta 263 Posted November 16, 2016 Report Share Posted November 16, 2016 Not sure why you're having a problem getting it to login. When I run the code below in v.5 it logins and then returns to the browser where digg displays the blue submit button. Just enter your twitter user and pass and run the script. ui text box("User:",#user) ui text box("Pass:",#pass) comment("I used the, in new browser command because for some reason after the first pass in the main browser the twitter pop would load blank. So it all works if you keep it in the new browser.") in new browser { allow popups("In New Window") clear cookies navigate("http://digg.com/submit","Don\'t Wait") wait for element(<url field>,"","Appear") type text(<url field>,"http://google.com","Standard") click($element offset(<login link>,2),"Left Click","No") in popup { comment("Login to twitter here.") wait for element(<name="session[username_or_email]">,"","Appear") type text(<name="session[username_or_email]">,#user,"Standard") type text(<name="session[password]">,#pass,"Standard") click(<id="allow">,"Left Click","No") wait for element(<id="allow">,"","Disappear") wait for browser event("Everything Loaded","") close page } pause script } stop script 2 Quote Link to post Share on other sites
golfer57 0 Posted November 16, 2016 Author Report Share Posted November 16, 2016 thanks go gogetta, appreciate the help. question, did you try to run the code that i posted? that did not work for you did it? it sure didn't for me. I will have to study the code you gave me, appears to work for me also. Thanks so much i truly appreciate your help, you really don't know, but i do. And thanks to UbotBuddy for your help and understanding, appreciate it. I am pretty much a newbie to this, but want to become efficient and talented where people can come to me as i did to you guys. If you have any suggestions on what to read, study, watch, video's to watch, etc in order for me to get good with ubot, please let me know. I am a sponge and need some fluid to absorb, please advise on what you think would be good to read or watch??? thanks in advance Quote Link to post Share on other sites
golfer57 0 Posted November 16, 2016 Author Report Share Posted November 16, 2016 I have a question please. I am looking at the code you generated above and looking at i see the following:click($element offset(<login link>,2),"Left Click","No")what is a element offsett? what does the number 2 mean in the offset?I watch a lot of the training videos and a lot of the time, they are trying to find something that does not have an offset. They never explain why they are doing that, but it seems they don't want an offset.Please explain what the offset is and what it is used for? Thanks everyone for being patient with my learning curve. Quote Link to post Share on other sites
deliter 203 Posted November 16, 2016 Report Share Posted November 16, 2016 Check out this quick tutorial I wrote,load the script to see it work Basically element offset,counts the total matches of the scrape query http://network.ubotstudio.com/forum/index.php/topic/19057-tutorial-what-are-element-offsets/ Quote Link to post Share on other sites
golfer57 0 Posted November 17, 2016 Author Report Share Posted November 17, 2016 thanks Quote Link to post Share on other sites
UBotBuddy 331 Posted November 17, 2016 Report Share Posted November 17, 2016 Thanks Gogetta! Thjis will help quite a few people. I see a lot of potential with this myself. Buddy 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.