Jump to content
UBot Underground

Adding to & updatng csv files


Recommended Posts

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 :rolleyes:

 

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.

Link to post
Share on other sites

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.

post-691-12774800624489_thumb.png

Link to post
Share on other sites

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.

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

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