jomark3 25 Posted July 31, 2012 Report Share Posted July 31, 2012 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 %ebooklistIf 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. Quote Link to post Share on other sites
merkaba 36 Posted July 31, 2012 Report Share Posted July 31, 2012 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 %ebooklistIf 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 Quote Link to post Share on other sites
JohnB 255 Posted July 31, 2012 Report Share Posted July 31, 2012 Here is a ubot file you can download:booklists.ubot Quote Link to post Share on other sites
jomark3 25 Posted July 31, 2012 Author Report Share Posted July 31, 2012 Thanks guys, I really appreciate it! Works great. 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.