![]() We can fork multiple child_proces in Node. Our CPU cores can run multiple processes at the same time. □ Learn more about the single threaded architecture of node here ![]() Therefore if we have to download 10 files each 1 gigabyte in size and each requiring about 3 mins to download then with a single process we will have to wait for 10 x 3 = 30 minutes for the task to finish. It can only execute one process at a time. You see Node.js in its core is a single-threaded system. However, if you have to download multiple large files things start to get complicated. In this next part, we will dive deep into some of the advanced concepts. I ultimately just need to get the data somewhere accessible by Google AppScript.Const browser = await puppeteer. My main issue is I don't understand how to actually handle file downloads in Puppeteer, I'm currently just editing the default download location for the google chrome instance puppeteer creates. So is there a way I could pass the file download in Puppeteer directly into Google AppScript somehow? Or use the Drive API to directly receive the file? IF I were to do that, my Drive for Desktop work-around would not be viable. Thing is, I'd like this to be some type of scheduled cloud function not having to be manually run on my computer. I don't yet understand all too well how to handle file downloads through puppeteer, but I currently have a work around by setting the default chrome download path to a folder on my computer, and that folder is actually Drive for desktop, so easy way to get files directly in drive. ![]() ![]() I currently have a Puppeteer script which automates CSV downloads into google drive which then allows me to programmatically access the data and move it into google sheets.Ĭurrently, I run this locally on my computer on VS code. Would appreciate if anyone can suggest ideas: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |