Jump to content
UBot Underground

Set variable from innertext


Recommended Posts

I have this div:

 
<div 
style="padding:4px;width:300px;background-color:#111;color:#fff;border:1px solid 
#666;font-size:11px;"><b>Maximum amount:</b> 50 
units</div>

I want to set a variable with the value 50 that is in the div.

The value in the div is different every time.

 

Is there anybody who know how to do this?

 

Link to post
Share on other sites

Here you go:

 

navigate("The_Page_You_Are_Scraping_From_Goes_Here", "Wait")
set(#var_WEB_ScrapeInnerValue, $scrape attribute(<innerhtml=w"<b>Maximum amount:</b> * units">, "innertext"), "Global")
set(#var_WEB_ScrapeInnerValue, $find regular expression(#var_WEB_ScrapeInnerValue, "(\\d)*"), "Global")
set(#var_WEB_ScrapeInnerValue, $trim(#var_WEB_ScrapeInnerValue), "Global")
  • 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...