Jump to content
UBot Underground

Drop Down Question


Recommended Posts

REGEX!!!!  I been avoiding that like a plague.  I guesss im going to have to learn it lol.  Thanks

Link to post
Share on other sites

Don't be afraid of REGEX, it's the most useful thing for scraping and you'll need it sooner or later, so I suggest you start learning. I must admit that patterns look really bad, but if you construct them on your own they all make sense.

 

However, you could also solve that without REGEX...for the page that we discussed there you could use code bellow:

navigate("http://www.adoos.com/posting/", "Wait")
wait for element(<name="geo1_id">, "", "Appear")
set(#TMP HTML, $scrape attribute(<name="geo1_id">, "outerhtml"), "Global")
load html(#TMP HTML)
clear list(%statesscraped)
add list to list(%statesscraped, $scrape attribute(<tagname="option">, "innertext"), "Delete", "Global")

Notice that you need to open scraped HTML in a browser because you can't directly scrape "options" tag name from that page, because it includes multiple dropdowns.

 

If there would be only 1 dropdown on the page you could simply use this code:

clear list(%statesscraped)
add list to list(%statesscraped, $scrape attribute(<tagname="option">, "innertext"), "Delete", "Global")

 

  • Like 1
Link to post
Share on other sites

 

Don't be afraid of REGEX, it's the most useful thing for scraping and you'll need it sooner or later, so I suggest you start learning. I must admit that patterns look really bad, but if you construct them on your own they all make sense.

 

However, you could also solve that without REGEX...for the page that we discussed there you could use code bellow:

navigate("http://www.adoos.com/posting/", "Wait")
wait for element(<name="geo1_id">, "", "Appear")
set(#TMP HTML, $scrape attribute(<name="geo1_id">, "outerhtml"), "Global")
load html(#TMP HTML)
clear list(%statesscraped)
add list to list(%statesscraped, $scrape attribute(<tagname="option">, "innertext"), "Delete", "Global")

Notice that you need to open scraped HTML in a browser because you can't directly scrape "options" tag name from that page, because it includes multiple dropdowns.

 

If there would be only 1 dropdown on the page you could simply use this code:

clear list(%statesscraped)
add list to list(%statesscraped, $scrape attribute(<tagname="option">, "innertext"), "Delete", "Global")

Thanks I donwloaded the editpad lite and watched the three video tutorials on REGEX.   I got it now.  Wasnt as bad as i thought :)

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...