def rating_schdule(): from mongoengine import Q for account in AccountItem.objects( Q(origin_oj='bestcoder') | Q(origin_oj='topcoder') | Q(origin_oj='codeforces') ).all(): account_crawler(account.origin_oj, account.username)
def hduoj_schedule(): for account in AccountItem.objects(origin_oj='hduoj').all(): account_crawler(account.origin_oj, account.username)