def __init__(self, urls): BatchCheckBase.__init__(self, pattern_id=VALID_URL_BASE, urls=urls) self.use_id = {} if self.usr_list: login = requests.get(_API_USER, headers=headers, params={'login': self.usr_list}, timeout=5) login.close() else: logger.debug('无twitch主播') return try: for pair in login.json()['data']: self.use_id[pair['id']] = pair['login'] except KeyError: logger.info(login.json()) return
def __init__(self, urls): BatchCheckBase.__init__(self, pattern_id=VALID_URL_BASE, urls=urls)