Jump to content
UBot Underground

add new data to existing file


Recommended Posts

hey, i´m new around here, so bare with me :-)

 

i just finished my first ever bot that collects urls from YT.

so how can i save the data to a file without erasing the old data inside the file?

 

everytime i use the "save to file" command, the old scraped data gets overwritten.

 

hlp

Link to post
Share on other sites

1) Read existing data into list 1.

 

2) Scrape new data into new list 2.

 

3) Add list 2 to list 1

 

4) Write list 1 back out.

 

So, effectively, you are adding the new URLs to the old URL's then writing the new collection back out, erasing the existing file but replacing it with the newer file with the old and new data combined.

  • Like 1
Link to post
Share on other sites
  • 3 weeks later...

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