awesome sauce 0 Posted February 3, 2016 Report Share Posted February 3, 2016 I am having a bit of problem navigating multiple pages on a site with UBot. I've used a loop that will look for class=next, and if it finds it it will run my scrape function. However, I am missing the last page of data. How would I visit all of the pages, INCLUDING the last page? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 4, 2016 Report Share Posted February 4, 2016 You can always run it one last time after your loop. You can set some kind of variable to make sure it doesn't scrape the last page twice in case there is some kind of accident like set the $url to be some variable and check it to make sure you don't get extra duplicate data if you are using a table. Quote Link to post Share on other sites
awesome sauce 0 Posted February 4, 2016 Author Report Share Posted February 4, 2016 Thank you. I actually figure it out. I make custom commands. So what I did was loop the custom command if class next is present, then once it's on the last page I just run the custom command outside of the loop. 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.