def get_token(cookie):
url = '<STR_LIT>'.join([<EOL>const.PASSPORT_URL,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', util.timestamp(),<EOL>'<STR_LIT>',<EOL>])<EOL>headers={<EOL>'<STR_LIT>': cookie.header_output(),<EOL>'<STR_LIT>': const.ACCEPT_HTML,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>req = net.urlopen(url, headers=headers)<EOL>if req:<EOL><INDENT>cookie = req.headers.get_all('<STR_LIT>')<EOL>content_obj = util.json_loads_single(req.data.decode())<EOL>if content_obj:<EOL><INDENT>return cookie, content_obj['<STR_LIT:data>']['<STR_LIT>']<EOL><DEDENT><DEDENT>return None<EOL>
获取一个页面访问的token, 这里需要之前得到的BAIDUID 这个cookie值

    这个token的有效期还不确定.
    返回的数据如下:
    {"errInfo":{"no": "0"},
     "data": {
         "rememberedUserName" : "",
         "codeString" : "",
         "token" : "xxxxx",
         "cookie" : "1",
         "usernametype":"2",
         "spLogin" : "rate",
         "disable":"",
         "loginrecord":{ 'email':[ ], 'phone':[]}
    }}