def crawl_follower_fans(uid): seed = SeedidsOper.get_seed_by_id(uid) if seed.other_crawled == 0: rs = get_fans_or_followers_ids(uid, 1, 1) rs.extend(get_fans_or_followers_ids(uid, 2, 1)) datas = set(rs) # If data already exits, just skip it if datas: SeedidsOper.insert_seeds(datas) SeedidsOper.set_seed_other_crawled(uid)
def crawl_follower_fans(uid): seed = SeedidsOper.get_seed_by_id(uid) if seed.other_crawled == 0: rs = get_fans_or_followers_ids(uid, 1, 1) rs.extend(get_fans_or_followers_ids(uid, 2, 1)) datas = set(rs) # If data already exits, just skip it if datas: SeedidsOper.insert_seeds(datas) SeedidsOper.set_seed_other_crawled(uid)
def crawl_follower_fans(uid): user, is_crawled = get_profile(uid) if user and user.verify_type == 2: SeedidsOper.set_seed_other_crawled(uid) return rs = get_fans_or_followers_ids(uid, 1, 1) rs.extend(get_fans_or_followers_ids(uid, 2, 1)) datas = set(rs) for uid in datas: get_profile(uid) # If data already exits, just skip it # if datas: # SeedidsOper.insert_seeds(datas) SeedidsOper.set_seed_other_crawled(uid)