Mohammad 0 Posted December 3, 2015 Report Share Posted December 3, 2015 how to scrap website different pages automatic, like my website status.pk i want ubot auto page navigation diffrents pages Quote Link to post Share on other sites
addy196 9 Posted December 3, 2015 Report Share Posted December 3, 2015 (edited) What exactly do you want to scrape from your website ? Edited December 3, 2015 by addy196 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 3, 2015 Report Share Posted December 3, 2015 If you are talking about pagination then usually there is a next button you can have the program look for that button and if it exists then click it and if it doesn't then it is the last page. 1 Quote Link to post Share on other sites
deliter 203 Posted December 5, 2015 Report Share Posted December 5, 2015 Are you looking for a scraper that just crawls sites? if so here is a truly aweful and useless one,but if it helps you then it was worth it define clickLink(#myLink) { navigate(#myLink,"Wait") wait for browser event("DOM Ready","") wait for browser event("Page Loaded","") wait for browser event("Everything Loaded","") add item to list(%pageScrape,$document text,"Don\'t Delete","Global") clear list(%hrefBefore) add list to list(%hrefBefore,$scrape attribute(<tagname="a">,"href"),"Delete","Global") set(#beforePos,0,"Global") set(#host,$eval("location.host"),"Global") set(#host,$find regular expression(#host,"\\..+?\\.\\w+$"),"Global") loop($list total(%hrefBefore)) { if($comparison($find regular expression($list item(%hrefBefore,#beforePos),"^/|{#myHost}"),">",$nothing)) { then { add item to list(%href,$list item(%hrefBefore,#beforePos),"Delete","Global") increment(#beforePos) } else { increment(#beforePos) } } } } define webCrawl { set(#url,$prompt("Crawl Website URL"),"Global") clickLink(#url) set(#position,0,"Global") loop while($comparison(#position,"<",$list total(%href))) { clickLink($list item(%href,#position)) increment(#position) } } webCrawl() 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.