Jump to content
UBot Underground

Scrape and Save to different .txt files


Recommended Posts

Hello,

 

I am trying to scrape and then save the content to a different file each time the loop cycles. For example saving different articles in text files like scrape1.txt, scrape2.txt, scrape3.txt etc. I receive the error “Unable to save to file†with attached a screen shot.

 

I also tried http://support.ubotstudio.com/index.php?/Knowledgebase/Article/View/44/10/ubot-studio-creating-files-as-the-script-runs with no luck.

 

Any help is appreciated.

Thanks!

 

post-1758-0-40951000-1310663756_thumb.jpg

Link to post
Share on other sites

try to remove the $list item and just set a variable outside the loop and put a 0 value on it. At the end of the loop put a "inc" in that variable. Put that variable inside your save file replacing the $list item.

 

If still doesn't help you can upload the source or pm it to me and I will edit it for you.

Link to post
Share on other sites

I tried to implement as you suggested but not sure if I did it correctly. Now I do not receive the error as before but there are no files being created. I am really stumped with this. I uploaded the relevant code for you to review. Thanks for the help!

 

 

 

test123.ubot

Link to post
Share on other sites

I tried to implement as you suggested but not sure if I did it correctly. Now I do not receive the error as before but there are no files being created. I am really stumped with this. I uploaded the relevant code for you to review. Thanks for the help!

 

 

 

test123.ubot

Here check this test123.ubot

Link to post
Share on other sites

Ok, almost got it.

 

Now each time the cycle loops and new .txt file is created for each scrape! The issue now is the content ( actual text being scraped) is the Same in each file. I tried adding a "clear list" after the "save file" but then no .txt files were created. Do I need to add "clear list" in another position? Any other suggestions?

 

Thanks a bunch!

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