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”.
But exact same javascript code is not opening up any text file for me. I checked my browser’s pop up settings too. What am I missing?
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.
Hey, it seems that I’ve tried all the variations of codes I found there also in Incognito but nothing really works. Mostly I have empty files. Can someone help me?
Thanks in advance!
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 new to this but have just learned that to post code blocks using markdown you put 3 backticks on before and after the code, you can also optionally add the language name after the first set of back ticks to add syntax highlighting, in this case javascript. if you want to post inline code you just use a single backtick. I am really just paraphrasing the information on markdown that I found here
Hi
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();