Optimus Prime 4 Posted January 26, 2013 Report Share Posted January 26, 2013 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 fishhow to buy a fishhow to feed a fish Thanks Quote Link to post Share on other sites
AutomationNinja 194 Posted January 26, 2013 Report Share Posted January 26, 2013 if it is html code in your %list it should look like <p>text n stuff</p> http://wiki.ubotstudio.com/wiki/Load_Html Quote Link to post Share on other sites
Optimus Prime 4 Posted January 26, 2013 Author Report Share Posted January 26, 2013 im using add list to list list1 scrape attribute and then I use the load html and drag list 1 into it. There is no raw html code in the load html . Is there a way to format the output of list1? Quote Link to post Share on other sites
AutomationNinja 194 Posted January 26, 2013 Report Share Posted January 26, 2013 The load html command is shows the html results in the browser add item to list(%list1, $scrape attribute(<id="hplogo">, "innerhtml"), "Delete", "Global")load html(%html) Quote Link to post Share on other sites
Brutal 164 Posted January 26, 2013 Report Share Posted January 26, 2013 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. Quote Link to post Share on other sites
magoo 31 Posted January 26, 2013 Report Share Posted January 26, 2013 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) 1 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.