Jump to content
UBot Underground

Recommended Posts

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 regex

but i don't know regex very well,i just start to learn it

Link to post
Share on other sites

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")

  • Like 1
Link to post
Share on other sites

 

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

  • Like 2
Link to post
Share on other sites
  • 3 weeks later...

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

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...