def demo__custom_identity_verify(identity_dict):
 import hashlib
 import requests
 import config
 if (('cc98_username' not in identity_dict) or ('cc98_password' not in identity_dict)):
  return False
 try:
  pass_md5 = hashlib.md5()
  pass_md5.update(identity_dict['cc98_password'].encode())
  pass_md5 = pass_md5.hexdigest()
  if config.is_use_proxy:
   proxy = config.requests_proxies
  else:
   proxy = None
  r = requests.post('http://www.cc98.org/sign.asp', data={'a': 'i', 'u': identity_dict['cc98_username'], 'p': pass_md5, 'userhidden': 2}, proxies=proxy)
  if (r.text == '9898'):
   return True
  else:
   return False
 except:
  return False

def demo__custom_identity_verify ( identity_dict ) : import hashlib import requests import config if ( ( 'cc98_username' not in identity_dict ) or ( 'cc98_password' not in identity_dict ) ) : return False try : pass_md5 = hashlib . md5 ( ) pass_md5 . update ( identity_dict [ 'cc98_password' ] . encode ( ) ) pass_md5 = pass_md5 . hexdigest ( ) if config . is_use_proxy : proxy = config . requests_proxies else : proxy = None r = requests . post ( 'http://www.cc98.org/sign.asp' , data = { 'a' : 'i' , 'u' : identity_dict [ 'cc98_username' ] , 'p' : pass_md5 , 'userhidden' : 2 } , proxies = proxy ) if ( r . text == '9898' ) : return True else : return False except : return False
for cc98 identity verify :type identity_dict: dict .