allcapone1912 7 Posted May 1, 2015 Report Share Posted May 1, 2015 hi,heed some help i am trying to scrape home year from zillow navigate("http://www.zillow.com/homes/3804 Emerson Dr%0960176_rb/","Wait") wait for element(<class="zsg-content-header addr">,"","Appear") wait(3) add list to list(%home year,$scrape attribute(<innertext=r"Built in ">,"innertext"),"Delete","Global") ive tried all combination with scrape attribute with no results so i think it can be done only with regexbut i don't know regex very well,i just start to learn it Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 2, 2015 Report Share Posted May 2, 2015 That site just does not play very well for me so I changed the user agent to iPhone (I'm guessing you did as well?) and was able to load a page (it looks like it redirects so that might be something you can catch and load the url directly)Anyways this will set a year variable with the year it was built in: set user agent("iPhone") navigate("http://www.zillow.com/homes/3804%20Emerson%20Dr%0960176_rb/", "Wait") wait for element(<class="zsg-content-header addr">, "", "Appear") wait(3) set(#facts, $scrape attribute(<class="fact-group-container zsg-content-component top-facts">, "innertext"), "Global") set(#year, $find regular expression(#facts, "(?<=Built\\sin\\s)\\d\{4,4\}"), "Global") 1 Quote Link to post Share on other sites
allcapone1912 7 Posted May 2, 2015 Author Report Share Posted May 2, 2015 That site just does not play very well for me so I changed the user agent to iPhone (I'm guessing you did as well?) and was able to load a page (it looks like it redirects so that might be something you can catch and load the url directly)Anyways this will set a year variable with the year it was built in: set user agent("iPhone") navigate("http://www.zillow.com/homes/3804%20Emerson%20Dr%0960176_rb/", "Wait") wait for element(<class="zsg-content-header addr">, "", "Appear") wait(3) set(#facts, $scrape attribute(<class="fact-group-container zsg-content-component top-facts">, "innertext"), "Global") set(#year, $find regular expression(#facts, "(?<=Built\\sin\\s)\\d\{4,4\}"), "Global") Thank you for your help,your reply really help me 2 Quote Link to post Share on other sites
gavind 6 Posted May 5, 2015 Report Share Posted May 5, 2015 Great! So are you all set AC? Quote Link to post Share on other sites
UBotBuddy 331 Posted May 24, 2015 Report Share Posted May 24, 2015 You can also try this: add list to list(%home year,$scrape attribute(<innertext=w"Built in ????">,"innertext"),"Delete","Global") The "?" is another wildcard except it focuses on single characters so when used like this it will find a 4 digit year. Buddy 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.