示例#1
0
文件: Common.py 项目: momo050200/Qos
def get_token(self, head, req_id=None, results=None):
    global file_path, base_url
    file_path = '.\common\cfginfo.ini'
    base_url = IniReader(file_path).get_value('url', 'base_url')
    if req_id == None:
        req_id = IniReader(file_path).get_value('url', 'get_token')
    url = base_url + req_id
    result = C.get(self, url, data=None, headers=head, results=results)
    return result
示例#2
0
文件: Common.py 项目: momo050200/Qos
def check_tencent(self, speed_id, head, results=None):
    check = IniReader(file_path).get_value('url', 'check_tencent')
    url = base_url + check + speed_id
    result = C.get(self, url, headers=head, results=results)
    return result