Jump to content
UBot Underground

list question


Recommended Posts

Worked on this problem late last night without success. Maybe someone can help.

 

I have a list of urls scraped from amazon as follows:

 

http://www.amazon.com/Humbug-Romantic-Christmas-Novella-ebook/dp/B005ME39HU/

http://www.amazon.com/Re-union-ebook/dp/B004K1F1TK/

http://www.amazon.com/Fifth-Avenue-Christopher-Smith/dp/1453887857/

http://www.amazon.com/Fifth-Avenue-Controversial-Best-Seller-ebook/dp/B0046ZS2G4/

http://www.amazon.com/Fifth-Avenue-Paperback-Christopher-Smith/dp/B00849ZEIW/

http://www.amazon.com/Eternal-Eden-Trilogy-Book-ebook/dp/B004SI455Q/

http://www.amazon.com/No-Turning-Back-Tiffany-Snow/dp/0615483305/

http://www.amazon.com/Turning-Back-Kathleen-Turner-ebook/dp/B0055EJ0VQ/

http://www.amazon.com/A-Family-Affair-ebook/dp/B004OL2OKK/

http://www.amazon.com/Family-Affair-Mary-Campisi/dp/1933725524/

 

If the url contains the term ebook, I want to place in %ebooklist

If it does not conatin the term ebook, I want to place it in %books

 

I thought it would be an easy matter, but I need some help. I have the standard license, v4.

ui button("evaluate") {
   set list position(%url, 0)
   loop($list total(%url)) {
       set(#eval_url, $next list item(%url), "Global")
       if($contains(#eval_url, "ebook")) {
           then {
               add item to list(%ebook, #eval_url, "Delete", "Global")
           }
           else {
               add item to list(%book, #eval_url, "Delete", "Global")
           }
       }
   }
}

tested it with two urls in a quick script and it appears to have sorted it fine

post-5219-0-52818100-1343736326_thumb.jpg

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