Note that there are some explanatory texts on larger screens.

plurals
  1. POPython Downloading From URL Error?
    primarykey
    data
    text
    <p>can anyone see a problem with this code because it keeps comming back with an error and this is the code and ill post the error under the code... thanks for the help in advanced...</p> <pre><code>import commands import os import pickle def readDir(): directory = raw_input('In which folder would you like to save the files?? \n') if(os.path.exists(directory)): print 'Error!! Please give an other name ' directory = raw_input('In which folder would you like to save the file??\n') os.mkdir(directory) os.chdir(directory) else: os.mkdir(directory) os.chdir(directory) readDir() url = raw_input('Which url are you aiming at ?\n') tmp = open('tempo.txt','w'); tmp.writelines(url) tmp.close() tmp = open('tempo.txt','r'); link = tmp.read() os.system(" curl " + link +"| egrep -o 'http:.*All\.ram' &gt; final.txt ") infile = open('final.txt', 'r') outfile = open('tmp.txt', 'w') for line in infile: outfile = open('tmp.txt', 'w') key = line list = key.split("/") dir = list[6] outfile.writelines(key) outfile.close() open('tmp.txt','r') os.system("cat tmp.txt | xargs -n1 -i curl {} &gt; links") os.system("wget -P %s -i links" %dir) infile.close() outfile.close() os.remove(outfile.name) os.remove('links') os.remove(tmp.name) </code></pre> <p>Error: i just used google as an example.</p> <pre><code>Which url are you aiming at ? google.com 'curl' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\Users\User\Desktop\download.py", line 52, in &lt;module&gt; infile = open('final.txt', 'r') IOError: [Errno 2] No such file or directory: 'final.txt' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload