lioncool 1 Posted October 19, 2014 Report Share Posted October 19, 2014 how i scrape only his name: texasbubba <div class="creditItem"> <a href="/texasbubba/photography/" title=" More from Photography "> Quote Link to post Share on other sites
giganut 109 Posted October 19, 2014 Report Share Posted October 19, 2014 give this regular expressions a shot, it may or may not work depeding the the rest of the page html, if you can post more of the page I could give you a better example. (?!<a\shref="\/)[A-Za-z]+(?=\/photography\/") Quote Link to post Share on other sites
lioncool 1 Posted October 19, 2014 Author Report Share Posted October 19, 2014 i want scrape username on pinterest page but i cant get it work here page http://www.pinterest.com/all/popular/ Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 20, 2014 Report Share Posted October 20, 2014 Not the prettiest thing in the world but it should work: clear list(%usernames) add list to list(%usernames, $scrape attribute(<class="creditItem">, "innerhtml"), "Delete", "Global") loop($list total(%usernames)) { set(#username, $find regular expression($next list item(%usernames), "(?<=href=\\\")\\/.*?(?=\\/)"), "Global") comment("do stuff") } 1 Quote Link to post Share on other sites
lioncool 1 Posted October 20, 2014 Author Report Share Posted October 20, 2014 Not the prettiest thing in the world but it should work: clear list(%usernames) add list to list(%usernames, $scrape attribute(<class="creditItem">, "innerhtml"), "Delete", "Global") loop($list total(%usernames)) { set(#username, $find regular expression($next list item(%usernames), "(?<=href=\\\")\\/.*?(?=\\/)"), "Global") comment("do stuff") } code work great how i scroll down page get more username Quote Link to post Share on other sites
giganut 109 Posted October 20, 2014 Report Share Posted October 20, 2014 code work great how i scroll down page get more username this will work for that. run javascript("window.scrollTo(0,document.body.scrollHeight); ") 2 Quote Link to post Share on other sites
lioncool 1 Posted October 20, 2014 Author Report Share Posted October 20, 2014 thank you 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.