ed08724 6 Posted July 16, 2016 Report Share Posted July 16, 2016 I have a member matrix that shows 5 referrals info and there is a link to see their referrals and if their referrals have referrals then they have a link, etc.the problem is until you click every link you can't get all the info. when you click the referral link it updates the current webpage with the referrals info via ajax.I was going to scrape all the urls and process separately but nothing actually exists in the source. even the first 5 are only filled in via ajax onload.I can probably figure out a way to process the html and open every link with a new navigate but it would be much easier if I could just click every link which gets everything into one static page.I need to click every link ONLY once because if I click the same link again it closes up that info. Quote Link to post Share on other sites
pash 504 Posted July 16, 2016 Report Share Posted July 16, 2016 Not sure if I understand correctly. navigate("https://ubotstudio.com/site/affiliate-program/?utm_source=anntrondevs&utm_medium=button&utm_campaign=jan","Wait") wait for browser event("Everything Loaded","") alert("Link total: {$list total($scrape attribute(<tagname="a">,"value"))}") set(#i,0,"Global") loop($list total($scrape attribute(<tagname="a">,"value"))) { click($element offset(<tagname="a">,#i),"Left Click","No") increment(#i) navigate("https://ubotstudio.com/site/affiliate-program/?utm_source=anntrondevs&utm_medium=button&utm_campaign=jan","Wait") wait for browser event("Everything Loaded","") } stop script click($element offset(<tagname="a">,1),"Left Click","No") click($element offset(<tagname="a">,3),"Left Click","No") Quote Link to post Share on other sites
ed08724 6 Posted July 16, 2016 Author Report Share Posted July 16, 2016 pash: the links don't exist in the source code to scrape, they only exist in the browser window. they are ajax. Quote Link to post Share on other sites
ed08724 6 Posted July 16, 2016 Author Report Share Posted July 16, 2016 I have noticed when I right click in the browser I can view source or view generated source.the generated source has the info I need. Is there a way to page scrape the generated source? Quote Link to post Share on other sites
ed08724 6 Posted July 16, 2016 Author Report Share Posted July 16, 2016 I solved it. it was a timing issue. I was page scraping after the original page loaded before the ajax fetched the updated info from the server. I put a delay in and now it scrapes the generated source which has the info I need. 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.