wouldjaball 5 Posted December 21, 2013 Report Share Posted December 21, 2013 (edited) Hey all,Had a bot running for Facebook for the last couple of months. Looks like they implemented some anti bot measures. Is there any way around this?http://screencast.com/t/CKFVG7IFI When the bot goes to click "upload photo/video" it somehow knows it's coming from a bot. Is there a work around for this? Please help! Here's what I have.. navigate("http://www.facebook.com", "Wait")type text($element offset(<email field>, 0), #FBemail, "Standard")type text($element offset(<password field>, 0), #FBpassword, "Standard")click(<login button>, "Left Click", "No")wait for browser event("Everything Loaded", "")navigate("https://www.facebook.com/{#Pagename}", "Wait")wait for browser event("Everything Loaded", "")loop($list total(%images)) { set(#ImageNumber, $next list item(%images), "Global") wait for browser event("Everything Loaded", "") wait(2) wait for browser event("Everything Loaded", "") wait(2) click(<title="Choose a file to upload">, "Left Click", "No") wait(2) have tried all different variations with innerhtml, tag, pictures etc... nothing seems to work.Thanks for any help, this is really screwing me up right now. -Wouldjaball Edited December 21, 2013 by wouldjaball Quote Link to post Share on other sites
Edward_2 85 Posted December 21, 2013 Report Share Posted December 21, 2013 Instead of clicking the upload button, try "Change File Field", Peace 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 21, 2013 Report Share Posted December 21, 2013 I don't do FB at all but I watched your video, try "change file field" and it should hopefully work without popping the open file window. Edit: What he said ^^^^ 2 Quote Link to post Share on other sites
Ptrick125 45 Posted December 22, 2013 Report Share Posted December 22, 2013 Start off by changing your user agent 1 Quote Link to post Share on other sites
Gogetta 263 Posted December 22, 2013 Report Share Posted December 22, 2013 Here is a work around that works. ui open file("Image:", #file) click(<innertext="Add Photo / Video">, "Left Click", "No") wait for element(<name="composer_unpublished_photo[]">, "", "Appear") change file field(<name="composer_unpublished_photo[]">, $nothing) wait for element(<name="xhpc_message_text">, "", "Appear") wait for browser event("Everything Loaded", "") change file field(<outerhtml=w"<input type=\"file\" class=\"*\" title=\"Choose a file to upload\" name=\"composer_unpublished_photo[]\" id=\"*\" multiple=\"\">">, #file) wait(1) wait for browser event("Everything Loaded", "") if($exists(<name="ok">)) { then { click(<name="ok">, "Left Click", "No") wait for element(<name="ok">, "", "Disappear") } else { } } 2 Quote Link to post Share on other sites
wouldjaball 5 Posted December 22, 2013 Author Report Share Posted December 22, 2013 Hey guys... thanks for all of your help, but it's still not working... I changed user agent to Safari and here's what I have code wise... the red line is where it seems to stall:wait for browser event("Everything Loaded", "") wait(2) wait for browser event("Everything Loaded", "") wait(2) This is where the code seems to stall... It no longer recognizes the innertext, and you can't change file field until that has been clicked. click(<innertext="Add Photo / Video">, "Left Click", "No") wait for element(<name="composer_unpublished_photo[]">, "", "Appear") change file field(<name="composer_unpublished_photo[]">, $nothing) wait for element(<name="xhpc_message_text">, "", "Appear") wait for browser event("Everything Loaded", "") change file field(<outerhtml=w"<input type=\"file\" class=\"*\" title=\"Choose a file to upload\" name=\"composer_unpublished_photo[]\" id=\"*\" multiple=\"\">">, #ImageNumber) wait(2) Thanks for your help! Quote Link to post Share on other sites
wouldjaball 5 Posted December 22, 2013 Author Report Share Posted December 22, 2013 (edited) correction guys, got it working...that code above should be good. Thanks everyone for your help! Edited December 22, 2013 by wouldjaball 1 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.