Jump to content
UBot Underground

Recommended Posts

Hey botters,

 

this place is amazing and thanks to all those that help others to build better bots :)

 

I have a question, i managed to build a semi-decent scraping bot and at the end it loads the html.

 

My question is this, i am using load html and i drag the list (this list has, scraped some stuff).

 

Is there a way to have the load html, show my keword on a new line, instead of them all crammed

 

together on a single line?

 

  my code ===> load html(%list1)

 

my output looks like this:fishing-how to fish-catch a fish-cook a fish-feed a fish- adopt a fish

 

I want to have it, look like this:

 

how to cook a fish

how to buy a fish

how to feed a fish

 

Thanks

Link to post
Share on other sites

This may be what you are looking for:

 

add list to list(%StuffYouAreScraping, $list from text($scrape attribute(<value=w"*
">, "value"), $new line), "Delete", "Global")

 

This will take your bunched up list that is all crammed together and re-format it how you are wanting.

 

 

I can't take any credit for this - I just had a similar issue and ZAP came in and gave me the code to achieve this.

 

 

After you do this, you can drag your %StuffYouAreScraping list into your load html and it will display how you want it.

Link to post
Share on other sites

Add html to your list.

 

Here is how to add a <br/> to the end of each line in a list.

 

clear list(%words)
clear list(%html_words)
navigate("http://ebay.com/", "Wait")
wait for element(<id="glbfooter">, "", "Appear")
add list to list(%words, $list from text($scrape attribute(<class="thrd">, "innertext"), $new line), "Delete", "Global")
loop($list total(%words)) {
    add item to list(%html_words, "{$next list item(%words)}<br/>", "Delete", "Global")
}
load html(%html_words)
  • 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...