import sys
import time
import datetime
sys.stdout.write("now \n")
for i in range(100):
sys.stdout.write("\r")
sys.stdout.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
sys.stdout.flush()
time.sleep(1)
float("inf")
float("-inf")
sys.maxint
sys.maxsize
from cookielib import MozillaCookieJar
from requests.auth import HTTPBasicAuth
from requests.auth import HTTPDigestAuth
import request
# 注意文件的协议
# 我使用 firefox 的扩展 Export Cookies,导出 firefox cookies.txt,因些是默认就可以了
cookies = MozillaCookieJar("cookies.txt")
cookies.load()
# 注意 http 与 https
proxies = { "http": "10.10.1.10:3128", # use http://10.10.1.10:3128 instead }
s = requests.session()
s.proxies = proxies
s.cookies = cookies
# s.auth = HTTPBasicAuth(user,passwd)
# s.auth = HTTPDigestAuth(user,passwd)