Jump to content
UBot Underground

How Do I Show A List Within Load Html?


Recommended Posts

Hi guys

 

I have a scraped list and I'd like to be able to show the results within the Load HTML command. I've tried this using a loop (also tried just posting the variable and also the list) but I can't get each item to appear on a new line within the HTML, sounds simple but it just doesn't seem to want to work for me.  Anybody help please?

 

set(#results,$scrape attribute(<outerhtml=w"<a href=\"/web/*/*\">*</a>">,"innertext"),"Global")
add list to list(%theresults,$list from text(#results,$new line),"Delete","Global")
loop while($comparison($list total(%theresults),"> Greater than",0)) {
    set(#current item,$list item(%theresults,0),"Global")
    load html("{#current item}
<br />

")
    remove from list(%theresults,0)
}

Link to post
Share on other sites

Give this a try:

set(#results,$scrape attribute(<outerhtml=w"<a href=\"/web/*/*\">*</a>">,"innertext"),"Global")
clear list(%theresults)
add list to list(%theresults,$list from text(#results,$new line),"Delete","Global")
set list position(%theresults,0)
clear list(%final result)
loop($list total(%theresults)) {
    add item to list(%final result,"{$next list item(%theresults)}<br>","Don\'t Delete","Global")
}
load html(%final result)
Link to post
Share on other sites

I'm not good html and javascript.
but this i found.
this sample.

load html("<textarea id=\"alltext\" style=\"width: 300px; height: 150px;\"></textarea>")
set(#loop,0,"Global")
loop(10) {
    run javascript("var textarea = document.getElementById(\'alltext\');
textarea.value += \"Hello {#loop}\\n\";
textarea.scrollTop = textarea.scrollHeight;")
    wait(1)
    increment(#loop)
}
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...