steved 5 Posted June 25, 2010 Report Share Posted June 25, 2010 Hi All, I'm having some challenges with my bots crashing while creating and installing wp on my sites. I'm using a csv to feed the urls, user etc and having the bot loop through the data. Unfortunately when it crashes I have no idea where it's at when it goes down. I'd like to be able to update either the original csv with a status column, or create a log csv that logs progress. I've looked at everything I can find on files and I don't see any way to update a row, or to just add a row. Of course I may have missed it too Anyone doing this currently? Ideally I'd love to be able to update the original csv with new columns but I suspect that'll be a tricky update to Ubot. Quote Link to post Share on other sites
sputnik13 12 Posted June 25, 2010 Report Share Posted June 25, 2010 Had the very same problem, came from the iMacros world of botting - and they just "append to file" Just as in-elegent to be sure but the only way Ive seen or read to do this in uBot is: 1. use a .txt or .csv file to store success or failures. 2. check for success on page 3. if success - read log file in to a %list via %add to list from file 4. add to list [ the new successfull URL or info you wish to add ] 5. resave new update list to log file. My code and nodes are attached as an example. Id love to find a better way!!! So please if folks have a way to make this better Id love to hear or see it. Quote Link to post Share on other sites
steved 5 Posted June 25, 2010 Author Report Share Posted June 25, 2010 Thanks Sputnick. I was hoping there was a better way but I guess at least it works Maybe this will be an enhancement down the road... Quote Link to post Share on other sites
webautomationlab 21 Posted June 25, 2010 Report Share Posted June 25, 2010 If the log is per session, always have a log list going, and add good (or bad) entries to those log lists and save each loop. Re-saving will overwrite the old list with the new one including the additional entries. It's really not that big a deal. The only downside with UBot is that the list will be stored in memory, so it will eat up resources if your logs are huge. But this is a problem for manipulating logs almost any way you do it. Quote Link to post Share on other sites
steved 5 Posted June 25, 2010 Author Report Share Posted June 25, 2010 The only downside with UBot is that the list will be stored in memory And that's my problem. If the bot crashes, I've lost the log. I have to save to a csv or txt file so that when it crashes I know where it got to. Or am I missing something? Quote Link to post Share on other sites
webautomationlab 21 Posted June 25, 2010 Report Share Posted June 25, 2010 If you save it each loop, you will only lose the data from the loop it crashes on. Which is the best any log can hope to do. Create log list. Each loop, add to list, and save to file. That way log grows each loop, and each loop, the complete log overwrites the previous one. Quote Link to post Share on other sites
sputnik13 12 Posted June 26, 2010 Report Share Posted June 26, 2010 was my posted example doing it the wrong way? Quote Link to post Share on other sites
webautomationlab 21 Posted June 26, 2010 Report Share Posted June 26, 2010 I don't know why you have to reload the list during the same session. Open a list, add each good entry, and resave the list (overwriting the old one) each time you add to it. Quote Link to post Share on other sites
steved 5 Posted June 28, 2010 Author Report Share Posted June 28, 2010 Is there any way to update the csv you're working on? I've added a status column and I'd like to set it to varying values dependent on what the bot's doing/did. I'm trying to avoid as much manual intervention as possible. Quote Link to post Share on other sites
webautomationlab 21 Posted June 28, 2010 Report Share Posted June 28, 2010 You could, but it would be easier to write out a separate status log. 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.