0
Downloader script PROBLEM
I making downloader python script. Actually I dont need file to download I need to be only in RAM and in a list. Here my code, I dont whats wrong. def download(): url = "http://arka.foi.hr/~mzlatovi/zadatak.csv" link = urllib.request.urlopen(url) data = link.read() lista = [ ] for row in link: row = red.rstrip().split(";") lista.append(row) link.close() print(lista) return lista I get empty list, but if I know I can download file.
2 Antworten
+ 11
Try this in your computer. I made some ajustments. But get memory limit exceeded in the playground. here is the code:
https://code.sololearn.com/ch2m3E0JksYO/?ref=app
0
Thanks for help I found that I needed data = link.read().decode().splitlines()