# encoding=utf-8
import urllib
from random import Random
from multiprocessing import Process
import httplib
import urllib2
import datetime
import simplejson as json
def do_post():
params = urllib.urlencode({‘username‘: ‘‘, ‘password‘: ‘‘, ‘task‘: ‘{"urls":["相关dir"]} , "callback" : {"email":["xxx"]}‘})
print params
f = urllib.urlopen("http://r.chinacache.com/content/refresh" , params)
print f.code
print f.read()
if __name__ == ‘__main__‘:
# for i in range(1):
# Process(target=do_post).start()
do_post()
时间: 2024-11-13 08:55:51