Jump to content
UBot Underground

Twitter Connction Issue


Recommended Posts

Hi guys, like you know, or not, I have made a bot for twitter...

 

But today, big issue, I can see the login page, and the twitter home page, I can field the login and pass, click on login button, but just after that I have a blank page, wtih this url https://twitter.com/sessions, and so, impossible to be connected.

 

I tried ubot4, not ubot 5 because too many problems with my big bot and all my plugins inside.

 

I've tried with lot of user agents, chrome, ff, mobile... same error.

 

All was working great since months, and today baaamm.... Many customers are impacted.

 

Do you have same issue if you are working on twitter ?

Edited by LoWrIdErTJ - BotGuru
Link to post
Share on other sites

removed duplicate post for you.

 

try mobile version of twitter?

 

 

and theres always using exbrowser, but would require an overhaul on all browser related items.  this would ned up using your installed browser on your pc this way.

Thanks, yes I've tried mobile version, and I already have exbrowser, I thnk I'm gonna use it for all my tools in my bot, but a lot of work...

Link to post
Share on other sites

hI TJ,

 

So can we use exbrowser to make autotweets on twitter? Because even using http plugin as below(purchased from a vendor)  doesnt seem to work and doesn't auto-post anything on twitter....

 

define RANKINCREASER_TWITTER {
    plugin command
("HTTP post.dll"
, "http max redirects", 10)
    plugin command("HTTP post.dll", "http auto redirect", "Yes")
    plugin command("HTTP post.dll", "http cookies folder", "C:\\cookies")
    set(#rankincreaser_twitter_accounts_listpos,0,"Global")
    set(#rankincreaser_current_action,"Starting Twitter Module","Global")
    loop($list total(%rankincreaser_twitter_accounts_list)) {
        set(#rankincreaser_videos_kw_listpos,0,"Global")
        set(#twitter_home_html,$plugin function("HTTP post.dll", "$http get", "http://twitter.com", "", "", #rankincreaser_proxy, ""),"Global")
        load html(#twitter_home_html)
        set(#twitter_auth_token,$plugin function("File Management.dll", "$Find Regex First", #twitter_home_html, "(?<=<input type=\"hidden\" value=\").*?(?=\" name=\"auth)"),"Global")
        set(#twitter_user,$replace($replace($find regular expression($list item(%rankincreaser_twitter_accounts_list,#rankincreaser_twitter_accounts_listpos),".*?(?=:)"),"
",""),"
",""),"Global")
        set(#twitter_pass,$find regular expression($list item(%rankincreaser_twitter_accounts_list,#rankincreaser_twitter_accounts_listpos),"(?<=:).*"),"Global")
        set(#rankincreaser_current_action,"Logging {#twitter_user}","Global")
        set(#twitter_login_post,$plugin function("HTTP post.dll", "$http post", "https://twitter.com/sessions", "session%5Busername_or_email%5D={$plugin function("SocketCommands.dll", "$url encode", #twitter_user)}&session%5Bpassword%5D={$plugin function("SocketCommands.dll", "$url encode", #twitter_pass)}&return_to_ssl=true&scribe_log=&redirect_after_login=%2F&authenticity_token={#twitter_auth_token}", "", "", #rankincreaser_proxy, ""),"Global")
        load html(#twitter_login_post)
        increment(#rankincreaser_twitter_accounts_listpos)
        if($comparison($find regular expression(#twitter_login_post,"login\\\\/error"),"=","login\\/error")) {
            then {
                set(#rankincreaser_current_action,"Login error({#twitter_user})","Global")
            }
            else {
                RANKINCREASER_WAIT()
                loop($list total(%rankincreaser_videos_kws_list)) {
                    set(#rankincreaser_current_action,"Sharing({#rankincreaser_videos_kw_listpos})","Global")
                    set(#twitter_home_html,$plugin function("HTTP post.dll", "$http get", "http://twitter.com", "", "", #rankincreaser_proxy, ""),"Global")
                    set(#twitter_auth_token,$find regular expression(#twitter_home_html,"(?<=<input type=\"hidden\" value=\").*?(?=\" name=\"auth)"),"Global")
                    set(#twitter_status_text,$replace regular expression($list item(%rankincreaser_videos_kws_list,#rankincreaser_videos_kw_listpos),"(?<=.*v.*):"," "),"Global")
                    set(#twitter_post_status_HTML,$plugin function("HTTP post.dll", "$http post", "https://twitter.com/i/tweet/create", "authenticity_token={#twitter_auth_token}&place_id=&status={$plugin function("HTTP post.dll", "$url encode", #twitter_status_text)}&tagged_users=", "", "", #rankincreaser_proxy, ""),"Global")
                    load html(#twitter_post_status_HTML)
                    increment(#rankincreaser_videos_kw_listpos)
                    wait(15)
                }
                RANKINCREASER_CHANGE_PROXY()
            }
        }
    }

Link to post
Share on other sites

If someone would just test this for me it will be great, if you can connect or not, please tell me ;)

ui text box("login twitter", #login)
ui text box("pass twitter", #pass)
navigate("https://twitter.com", "Wait")
wait for browser event("DOM Ready", "")
type text($element offset(<email field>, 1), #login, "Standard")
type text($element offset(<password field>, 1), #pass, "Standard")
click($element offset(<login button>, 1), "Left Click", "No")
wait(1)
wait for browser event("DOM Ready", "")
Link to post
Share on other sites

I tried it within ExBrowser and no problems.

 

Video:
http://screencast.com/t/YqSoGE82Nc0k

 

Example code:

ui text box("login twitter",#login)
ui text box("pass twitter",#pass)
plugin command("ExBrowser.dll", "ExBrowser CleanUp")
plugin command("ExBrowser.dll", "ExBrowser Delete All Cookies")
plugin command("ExBrowser.dll", "ExBrowser Launcher", "Chrome", "", "")
plugin command("ExBrowser.dll", "ExBrowser Delete All Cookies")
plugin command("ExBrowser.dll", "ExBrowser Navigate", "https://twitter.com")
wait(2)
plugin command("ExBrowser.dll", "ExBrowser Click", "x://*[@id=\"doc\"]/div[1]/div/div[1]/div[2]/button")
plugin command("ExBrowser.dll", "ExBrowser Wait For Element", "x://*[@name=\"session[username_or_email]\"]", "Appear", 20)
wait(2)
plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://*[@name=\"session[username_or_email]\"]", #login, 100, 150)
plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://*[@name=\"session[password]\"]", #pass, 100, 150)
plugin command("ExBrowser.dll", "ExBrowser Send Special Key", "x://*[@name=\"session[password]\"]", "Enter")
wait(1)
alert("Loaded")
  • Like 1
Link to post
Share on other sites

 

I tried it within ExBrowser and no problems.

 

Video:

http://screencast.com/t/YqSoGE82Nc0k

 

Example code:

ui text box("login twitter",#login)
ui text box("pass twitter",#pass)
plugin command("ExBrowser.dll", "ExBrowser CleanUp")
plugin command("ExBrowser.dll", "ExBrowser Delete All Cookies")
plugin command("ExBrowser.dll", "ExBrowser Launcher", "Chrome", "", "")
plugin command("ExBrowser.dll", "ExBrowser Delete All Cookies")
plugin command("ExBrowser.dll", "ExBrowser Navigate", "https://twitter.com")
wait(2)
plugin command("ExBrowser.dll", "ExBrowser Click", "x://*[@id=\"doc\"]/div[1]/div/div[1]/div[2]/button")
plugin command("ExBrowser.dll", "ExBrowser Wait For Element", "x://*[@name=\"session[username_or_email]\"]", "Appear", 20)
wait(2)
plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://*[@name=\"session[username_or_email]\"]", #login, 100, 150)
plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://*[@name=\"session[password]\"]", #pass, 100, 150)
plugin command("ExBrowser.dll", "ExBrowser Send Special Key", "x://*[@name=\"session[password]\"]", "Enter")
wait(1)
alert("Loaded")

 

Yes I know that this is working good with exbrowser, thank you, but not my problem, my problem is with the ubot browser. My bot is very big and it will take me month to update all the code with exbrowser plugin...

 

What is strange is that on some computer my bot is working, some other not... Yesterday all my customers were good, I have made no update and today there is this issue, not for everyone... makes me crazy

Edited by zenos
Link to post
Share on other sites

Yes I know that this is working good with exbrowser, thank you, but not my problem, my problem is with the ubot browser. My bot is very big and it will take me month to update all the code with exbrowser plugin...

 

What is strange is that on some computer my bot is working, some other not... Yesterday all my customers were good, I have made no update and today there is this issue, not for everyone... makes me crazy

I understand.  1 thing to keep in mind when coding.  sometimes its best to take a change of coarse now, rather than later.  later will take you even longer to change as there will be even more code.

not telling you that you have to.  but if it takes care of your issues and for the long haul going to be a better solution.  sounds like changing over might be best for the long haul.

Link to post
Share on other sites

ui text box("login twitter"#login)
ui text box("pass twitter"#pass)
navigate("https://twitter.com/login?lang=en""Wait")
wait for browser event("DOM Ready""")
type text($element offset(<email field>, 1), #login"Standard")
type text($element offset(<password field>, 1), #pass"Standard")
click($element offset(<login button>, 1), "Left Click""No")
wait(1)
wait for browser event("DOM Ready""")

 

Login with no problem, just changed navigate("https://twitter.com/login?lang=en""Wait")

Link to post
Share on other sites

impossible for me to use ubot browser, the only things that work is going to mobile.twitter.com , wait 30 seconds (yes 30) and connect.... If I wait less it doens't connect.

It could be less, but for low internet connections like me, 30 is the right solution... This is not really good, so I'm starting to make all my bot working with exbrowser.

 

Yes, they did.  But is it working now for you?  Are you still using ubot browser?

Link to post
Share on other sites
  • 2 months later...

Hi TJ,

 

I followed your video and also was able to get the exbrowser to post tweet with CHROME as well but as soon as I switched to phantom JS it is not posting tweet. You can see my code below. I even changed the user agent to mozilla firefox and it still didnt post the tweet with phantom JS. What could be the issue?

 

ui text box("Username",#Username)
ui text box("Password",#Password)
plugin command("ExBrowser.dll", "ExBrowser CleanUp")
plugin command("ExBrowser.dll", "ExBrowser Launcher", "PhantomJS", "", $plugin function("ExBrowser.dll", "$ExBrowser Set User Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"))
plugin command("ExBrowser.dll", "ExBrowser Delete All Cookies")
plugin command("ExBrowser.dll", "ExBrowser Navigate", "https://twitter.com")
wait(2)
plugin command("ExBrowser.dll", "ExBrowser Click", "x://*[@id=\"doc\"]/div[1]/div/div[1]/div[2]/a[3]")
plugin command("ExBrowser.dll", "ExBrowser Wait For Element", "x://input[@name=\"session[username_or_email]\"]", "Appear", 20)
wait(2)
plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://input[@name=\"session[username_or_email]\"]", #Username, 100, 150)
plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://input[@name=\"session[password]\"]", #Password, 100, 150)
plugin command("ExBrowser.dll", "ExBrowser Send Special Key", "x://input[@name=\"session[password]\"]", "Enter")
if($plugin function("ExBrowser.dll", "$ExBrowser Element Exist", "x://button[@class=\"submit btn primary-btn\"]")) {
    then {
        alert("try again!")
        plugin command("ExBrowser.dll", "ExBrowser Close")
    }
    else {
        wait(1)
        plugin command("ExBrowser.dll", "ExBrowser Wait For Element", "x://*[@id=\"global-new-tweet-button\"]", "Appear", 20)
        plugin command("ExBrowser.dll", "ExBrowser Click", "x://*[@id=\"global-new-tweet-button\"]")
        plugin command("ExBrowser.dll", "ExBrowser Wait For Element", "x://*[@id=\"tweet-box-global\"]", "Appear", 20)
        plugin command("ExBrowser.dll", "ExBrowser Type Text (Human Delay)", "x://*[@id=\"tweet-box-global\"]", #hello, 100, 150)
        plugin command("ExBrowser.dll", "ExBrowser Click", "x://button[@class=\"btn primary-btn tweet-action tweet-btn js-tweet-btn\"]")
    }
}
ui text box("hellp",#hello)

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...