- json
import datetime import json res=json.loads(rs) print(datetime.datetime.now(),'D01', res['data'])
- http-get
import requests url = "www.baidu.com" payload = {} headers = { 'Cookie': '123' } response = requests.request("GET", url, headers=headers, data = payload) print(response.text.encode('utf8'))
- listdir
import os for filename in os.listdir(r'.'): print filename
os.rename(filename,filename.replace(' ','_'))