エラーが返され続け、これがコードであり、コードの下にエラーを投稿するため、このコードの問題を誰でも見ることができます...高度なヘルプに感謝します...
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' > 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 {} > links")
os.system("wget -P %s -i links" %dir)
infile.close()
outfile.close()
os.remove(outfile.name)
os.remove('links')
os.remove(tmp.name)
エラー: 例として Google を使用しました。
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 <module>
infile = open('final.txt', 'r')
IOError: [Errno 2] No such file or directory: 'final.txt'