PooperScooper 0 Posted December 9, 2009 Report Share Posted December 9, 2009 I'm trying to clean up a scraped list with the replace command, but I can't seem to get it to work. I've tried a few different ways, but nothing works. Does replace only work when trying to change a page's attributes or something? I notice that that seems to be the only way to access the replace stuff. Is there an easier way to change aspects of items inside of a list? Quote Link to post Share on other sites
Guest Jim Posted December 9, 2009 Report Share Posted December 9, 2009 Can you post a screenshot of what you're trying? Would help figure out where you're going wrong. From what I can gather, you're trying to use the replace attribute command on a list? You might want to take a look at the replace function in my strings library: http://ubotstudio.com/forum/index.php?topic=371.0 Quote Link to post Share on other sites
PooperScooper 0 Posted December 9, 2009 Author Report Share Posted December 9, 2009 Honestly, my script has become so mixed up at this point from all the failed attempts I've tried. I'll have to start from scratch once I get this figured out, lol. But yea, that's what I'm trying to do. Tried your library, but I must be doing something wrong because nothing gets replaced. In my attached image nothing but the original #test content gets saved. Quote Link to post Share on other sites
Guest Jim Posted December 9, 2009 Report Share Posted December 9, 2009 Here's the proper syntax: Quote Link to post Share on other sites
PooperScooper 0 Posted December 9, 2009 Author Report Share Posted December 9, 2009 Thanks Jim, that works! Can't seem to get it to work with a list because I'm an idiot. ??? I don't suppose you'd be willing to post an example of how I could do that? Sorry for my incompetence! Quote Link to post Share on other sites
Guest Jim Posted December 9, 2009 Report Share Posted December 9, 2009 Set up a loop and get each item, clean it, and add it to a new list. Quote Link to post Share on other sites
PooperScooper 0 Posted December 10, 2009 Author Report Share Posted December 10, 2009 Thanks Jim. That's actually what I've been trying, but no luck so far. The loop in the image below returns the same result over and over, or if delete duplicate is checked just 1 result, obviously. I've tried passing the clean item to a variable first and then adding that to a list as well, but that gives me the same result. Not sure where I'm going wrong here. Quote Link to post Share on other sites
Guest Jim Posted December 10, 2009 Report Share Posted December 10, 2009 The problem with what you're trying to do is that the list position never changes - so, you get the same result over and over again. Give this a try: Quote Link to post Share on other sites
PooperScooper 0 Posted December 10, 2009 Author Report Share Posted December 10, 2009 I thought that using the list position in the loop would make it change, but apparently I was wrong, heh. Oh well. Works perfectly now though. Thanks so much Jim! Quote Link to post Share on other sites
southsider 0 Posted February 22, 2010 Report Share Posted February 22, 2010 I am trying to clean a list of duplicates also, but I see the code that was posted below is now missing. Any help from anyone on how to clean a list of duplicates? Thanks in Advance. Quote Link to post Share on other sites
southsider 0 Posted February 23, 2010 Report Share Posted February 23, 2010 I am trying to clean a list of duplicates also, but I see the code that was posted below is now missing. Any help from anyone on how to clean a list of duplicates? Thanks in Advance.Any help from anyone? 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.