Esempio n. 1
0
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
Esempio n. 2
0
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