Reverze 0 Posted December 23, 2012 Report Share Posted December 23, 2012 I need to scrape a little part of a div and set it as a variable, but after trying it for 2 days now I can't figure out what to do, so I hope there is somebody that want to help me out here. Below is the div and the only part I need is the country (in bold) that is different every time.Is there a way to filter that part from the div and put it in a variable? <div class="right"> <div class="top_bar"> <ul class="user_left"> <li class="user1"><span class="white">Money:</span> $<b style="font-weight:normal;" id="upd_money">0</b></li> <li class="user_bar">|</li> <li class="user2"><span>Bullets:</span> <b style="font-weight:normal;" id="upd_bullets">0</b></li> <li class="user_bar">|</li> <li class="user2"><span>Points:</span> <b style="font-weight:normal;" id="upd_points">0</b></li> <li class="user_bar">|</li> <li class="user2"><span>Health:</span> <b style="font-weight:normal;" id="upd_health">100%</b></li> <li class="user_bar">|</li> <li class="user2"><span>Country:</span> <b style="font-weight:normal;">South-Africa</b></li> <li class="user_bar">|</li> <li class="user2"><span style="color:#ff9393;">Crackers:</span> <b style="font-weight:normal;color:#93ffa0;">0</b> </li></ul> </div> Quote Link to post Share on other sites
odeesuba 24 Posted December 23, 2012 Report Share Posted December 23, 2012 set(#Country, $scrape attribute(<outerhtml=w"<b style=\"font-weight:normal;\">*</b>">, "innertext"), "Global") Quote Link to post Share on other sites
Reverze 0 Posted December 23, 2012 Author Report Share Posted December 23, 2012 Thank you, this works!I was thinking to complicated and tried to solve this with a regex. 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.