spa3212 1 Posted August 22, 2017 Report Share Posted August 22, 2017 you are just amazing..Thanks can you please help me with this..issue.. I want to scrape user profiles from this page..https://www.facebook...54908821393941/ after this bot needs to send message, but I don't find an option to send message as there is no option to send..can please look at the code and help me out.. Thanksui text box("UserName",#username)ui text box("Password",#password)ui open file("page/Group Name",#pagegroupnames)create table from file(#pagegroupnames,&pagegroupnamescsv)set(#row3,0,"Global")set(#row2,0,"Global")set(#row1,0,"Global")define profile scraper(#profilescraper) {navigate($table cell(&pagegroupnamescsv,#row2,0),"Wait")click(<id="count_text">,"Left Click","No")wait for browser event("Everything Loaded","")click(<class="pam uiBoxLightblue uiMorePagerPrimary">,"Left Click","No")add list to list(%Groupmembers,$scrape attribute(<tagname="a">,"href"),"Delete","Global")add list to table as column(&myuserlist,#row1,0,%Groupmembers)save to file("{$special folder("Application")}\\Userlist.csv",&myuserlist)}define Login to facebook(#logintofacebook) {set user agent("Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36")navigate("https://www.facebook.com/","Wait")wait(2)wait for browser event("Everything Loaded","")type text($element offset(<email field>,0),#username,"Standard")wait(3)type text($element offset(<password field>,0),#password,"Standard")wait(1)click(<id="loginbutton">,"Left Click","No")wait for browser event("Everything Loaded","")}loop(1) {Login to facebook(#logintofacebook)wait(5)profile scraper(#profilescraper)}add list to list(%memberslist2,$list from file("{$special folder("Application")}\\Userlist.csv"),"Delete","Global")wait(5)loop(5) {navigate($next list item(%memberslist2),"Wait")wait for browser event("Everything Loaded","")click(<innertext="Message">,"Left Click","No")wait(2)type text(<class="_552h">,"hello","Key Press")wait(2)plugin command("WindowsCommands.dll", "keyboard event", "Enter", "Key Press")wait(10)}Thanks for your help I am still learning new things everyday. with your help Quote Link to post Share on other sites
spa3212 1 Posted August 23, 2017 Author Report Share Posted August 23, 2017 solved clicking enter Ref HelloInsomnia type text(<name="add_comment_text">, "\{ENTER\}", "Standard") But still how to scrape user profile if someone know how to regex to scrape user profile links only.. 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.