diff --git a/pipelines/fetch-farcaster-data/fetch.py b/pipelines/fetch-farcaster-data/fetch.py index a97c9e4..44ba804 100644 --- a/pipelines/fetch-farcaster-data/fetch.py +++ b/pipelines/fetch-farcaster-data/fetch.py @@ -173,7 +173,7 @@ def run(self): member_fids = [str(member['user']['fid']) for member in members if 'user' in member and 'fid' in member['user']] follower_fids = [str(follower['fid']) for follower in followers if 'fid' in follower] all_fids = list(set(member_fids + follower_fids)) - channel_dict['all_channels'] = self.get_all_user_channels(followers) + channel_dict['all_channels'] = self.get_all_user_channels(follower_fids) channel_dict['all_followed_channels'] = self.get_all_user_channels(all_fids) channel_dict['casts'] = channel_casts = self.get_channel_casts(channel) all_channel_data["channels"].append(channel_dict) diff --git a/pipelines/ingest-farcaster-data/helpers.py b/pipelines/ingest-farcaster-data/helpers.py index da98d6f..1c6c7e6 100644 --- a/pipelines/ingest-farcaster-data/helpers.py +++ b/pipelines/ingest-farcaster-data/helpers.py @@ -2,7 +2,6 @@ import logging import time import re -import math import sys from datetime import datetime from typing import Optional, Union, List, Dict, Any @@ -13,7 +12,6 @@ import json import boto3 from botocore.exceptions import ClientError -from tqdm import tqdm # Set up logging logging.basicConfig(level=logging.INFO) diff --git a/pipelines/ingest-farcaster-data/ingest.py b/pipelines/ingest-farcaster-data/ingest.py index b079925..3397154 100644 --- a/pipelines/ingest-farcaster-data/ingest.py +++ b/pipelines/ingest-farcaster-data/ingest.py @@ -42,7 +42,7 @@ def create_channel_followers(self): followers_df = pd.DataFrame([{ 'channelId': channelId, 'fid': str(user.get('fid')), - 'verifiedSocials': user.get('profile').get('verified_accounts'), + 'verifiedSocials':user.get('profile', {}).get('verified_accounts', []), 'username': self.cyphers.sanitize_text(user.get('username', '')), 'display_name': self.cyphers.sanitize_text(user.get('display_name', '')), 'custody_address': user.get('custody_address', ''),