def __init__(self): avatar() # get email - password and to email self.email = input('Enter Your Email : ') self.password = input( 'Enter your email password , **Note your password is stored locally on your system** : ' ) self.to_email = input( 'Email Address that you want to get alert , LEAVE BLANK if ' + self.email + ' : ') or self.email # for validating an Email regex = '^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$' # validating an Email # and the string in search() method if re.search(regex, self.email) and re.search(regex, self.to_email): print('*' * 150) print("Email Register... done!") print('*' * 150) # call get url function self.get_url() else: print('-' * 150) print("Invalid Email, Try Again !") print('-' * 150) # if invalid email re-run init() self.__init__()
def update_check(player, mode): if mode == 'rnk': result = PlayerStats.objects.filter(player_id=player) elif mode == 'cs': result = PlayerStatsCasual.objects.filter(player_id=player) elif mode == 'acc': result = PlayerStatsPublic.objects.filter(player_id=player) if result.exists(): result = result.values('updated')[0] tdelta = datetime.now() - datetime.strptime(str(result['updated']), "%Y-%m-%d %H:%M:%S") if tdelta.seconds + (tdelta.days * 86400) > 12000: avatar(None, player, 10) update_player(player, mode) else: avatar(None, player, 10) update_player(player, mode)
def avatar(self, size): return avatar(self.author_email, size)
def avatar(self, size): return avatar(self.email, size)