amirainvest / amirainvest_com

Checkout the work we did to build Amira Invest
2 stars 0 forks source link

KeyError: "data" #302

Open jhirschibar opened 2 years ago

jhirschibar commented 2 years ago

Sentry issue: DATA_IMPORTS-4


        return self.twitter_user_id
    def load_twitter_user_data(self):
        params = {"user.fields": "profile_image_url,public_metrics"}
        user_data = requests.request(
            "GET",
            f"{TWITTER_API_URL}/2/users/by/username/{self.username}",
            headers=HEADERS,
            params=params,
        ).json()["data"]```