Jump to content
UBot Underground

[SOLVED] Format load html display text


Recommended Posts

I hope I explain this well enough.

 

1- I scrape data from multiple pages.

 

2- Each data set gets saved into it's own list.

 

The 1st  list structure is"

(0)

(1)

(2)

(3)

(4)

...and so on

 

 

The 2nd  list structure is"

(0)

(1)

(2)

(3)

(4)

...and so on

 

 

So, I have 2 of those lists... One list contains webpage titles and the other contains webpage urls.

 

I want to be able to get to display as:

 

(0)title

(0)url

 

 

(1)title

(1)url

 

And so on.

 

in an "load H*ml" window.

 

So, instead of it displaying as:

 

title title title title

url url url url

 

I want...

title

url

 

title

url

 

 

title

url

Link to post
Share on other sites

Hi,

 

Sample code:

set(#titletoload, "title1
title2
title3
title4", "Global")
set(#urltoload, "url1
url2
url3
url4", "Global")
clear list(%titles)
add list to list(%titles, $list from text(#titletoload, $new line), "Delete", "Global")
clear list(%urls)
add list to list(%urls, $list from text(#urltoload, $new line), "Delete", "Global")
set(#htmlformatted, $nothing, "Global")
loop($list total(%titles)) {
    set(#titleitem, "No value", "Global")
    if($comparison($list position(%titles), "<", $list total(%titles))) {
        then {
            set(#titleitem, $next list item(%titles), "Global")
        }
        else {
        }
    }
    set(#urlitem, "No value", "Global")
    if($comparison($list position(%urls), "<", $list total(%urls))) {
        then {
            set(#urlitem, $next list item(%urls), "Global")
        }
        else {
        }
    }
    set(#htmlformatted, "{#htmlformatted}{#titleitem}<br>{$new line}{#urlitem}<br>{$new line}<br><br>{$new line}", "Global")
}
load html(#htmlformatted)

Kevin

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