Jump to content
UBot Underground

[Solved]Scraping values between quote marks


Recommended Posts

I would like to scrape the three strings between value="..." as in the following example:

 

<ul class="radio_list"><li><input name="answer_70603" type="radio" value="45 minutes" id="answer_70603_45_minutes" /> <label for="answer_70603_45_minutes">45 minutes</label></li>
<li><input name="answer_70603" type="radio" value="15 minutes" id="answer_70603_15_minutes" /> <label for="answer_70603_15_minutes">15 minutes</label></li>
<li><input name="answer_70603" type="radio" value="60 minutes" id="answer_70603_60_minutes" /> <label for="answer_70603_60_minutes">60 minutes</label></li></ul>

 

I then want to take each value and put it into a list:

 

45 minutes

15 minutes

60 minutes

 

 

I realise I'm probably over thinking it, but I'm going round in circles and can't work out what I should be doing.

 

I did attempt to use regex with this: \svalue="(.*?)"

 

but then couldn't work out where I should place it in UBot.

 

Can anyone help advise me?

Link to post
Share on other sites

ry this:

 

clear list(%scrape)

load html("<ul class=\"radio_list\"><li><input name=\"answer_70603\" type=\"radio\" value=\"45 minutes\" id=\"answer_70603_45_minutes\" /> <label for=\"answer_70603_45_minutes\">45 minutes</label></li>

<li><input name=\"answer_70603\" type=\"radio\" value=\"15 minutes\" id=\"answer_70603_15_minutes\" /> <label for=\"answer_70603_15_minutes\">15 minutes</label></li>

<li><input name=\"answer_70603\" type=\"radio\" value=\"60 minutes\" id=\"answer_70603_60_minutes\" /> <label for=\"answer_70603_60_minutes\">60 minutes</label></li></ul>")

add list to list(%scrape, $scrape attribute(<for=w"answer_*">, "innertext"), "Delete", "Global")

 

 

 

John

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