def __init__(self, conpool=None, cookie_str=None, throw_exception=True):
"""conpool: ?????????????? int???? 10
cookie_str: ??????? Cookie???? String
throw_exception: ????????????? bool???? True
"""
self.throw_exception = throw_exception
if conpool is None:
self.conpool = httpconpool(10)
else:
self.conpool = conpool
self.initcookie = Cookie.SimpleCookie()
if cookie_str:
if not cookie_str.endswith(';'):
cookie_str += ";"
for cookiepart in cookie_str.split(";"):
if cookiepart.strip() != "":
cookiekey, cookievalue = cookiepart.split("=", 1)
self.initcookie[cookiekey.strip()] = cookievalue.strip()
self.cookiepool = {}
评论列表
文章目录