-2
1. 我用-o 試圖werwe WER疫情週報WER我們 2.and >> text.txtrr rrrrrrrrrrrrrrrrrrrrrrrrPython:如何將輸出保存到文本文件?
# -*- coding: iso-8859-15
import sys
import requests
import os
if len(sys.argv) >= 2:
os.system('clear')
print "Please wait.."`enter code here`
P1 = str(sys.argv[1])
url = "http://example.com/index.php"
data= {
'getp1':'%s'%(P1)
}
r = requests.get(url,params=data) -o text.txt
os.system('clear')
print r.content
else:
print "[ERROR] Este programa nerrcesita un parámetro";
你有什麼問題? – bpachev