In this lesson, there are some instruction on how to download images. Here is the code from the course: urls = Array.from(document.querySelectorAll('.rg_di .rg_meta')).map(el=>JSON.parse(el.textContent).ou); window.open('data:text/csv;charset=utf-8,' + escape(urls.join('\n')));
The course notes says something like " I hit enter and it downloads my file for me. So I would call this teddies.txt and press “Save”.
Hello I am 2nd year b.tech student and know only basic python,i recently watched 1 video on deep learning but could not understand the whole stuff. please tell me how to get started in fast ai, I am just a beginner and want to learn ai. Thanks
Step by step my man. Inch by inch. Get a little bit better every day. It all eventually comes together. I too have mostly a finance background and kind of self-learned Python and am working through the FastAi course. Trust yourself and work hard. Feel free to message me if you have anything further.
Thanks @zaryabmakram & @lowcountrypj I managed to download a file of links using your instructions and code snippet after much frustration and your posts are appreciated. The only thing I had to change was that I had to go to the post from @zaryabmakram from August and retrieve the original code snippet from the markdown formatted post, I believe posting the code directly into text seems to mess up the single quotes in the code:
I am facing the same issue . I tried using your code. However the file that downloaded is a empty file. I tried the original command and your command in incognito mode. But it didn’t help. I am using Chrome browser .Any ideas?
With some digging , this worked for me var urls=Array.from(document.querySelectorAll('.rg_i')).map(el=> el.hasAttribute('data-src')?el.getAttribute('data-src'):el.getAttribute('data-iurl')); var hiddenElement = document.createElement('a'); hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(urls.join('\n')); hiddenElement.target = '_blank'; hiddenElement.download = 'myFile.txt'; hiddenElement.click();