aus10powell commited on
Commit
090b13e
1 Parent(s): 0fabb50

Update scripts/twitter_scraper.py

Browse files
Files changed (1) hide show
  1. scripts/twitter_scraper.py +3 -2
scripts/twitter_scraper.py CHANGED
@@ -50,7 +50,7 @@ def get_latest_account_tweets(handle):
50
  df_tweets["handle"] = df_tweets.user.iloc[0]["screen_name"]
51
 
52
  return df_tweets
53
-
54
  except tweepy.TweepError as e:
55
  # Handle specific error conditions
56
  if e.api_code == 63:
@@ -59,10 +59,11 @@ def get_latest_account_tweets(handle):
59
  print("Rate limit exceeded. Please try again later.")
60
  else:
61
  print("Error occurred during API call:", str(e))
 
62
 
63
  except Exception as e:
64
  print("An error occurred:", str(e))
65
-
66
  return None
67
 
68
 
 
50
  df_tweets["handle"] = df_tweets.user.iloc[0]["screen_name"]
51
 
52
  return df_tweets
53
+
54
  except tweepy.TweepError as e:
55
  # Handle specific error conditions
56
  if e.api_code == 63:
 
59
  print("Rate limit exceeded. Please try again later.")
60
  else:
61
  print("Error occurred during API call:", str(e))
62
+ return str(e)
63
 
64
  except Exception as e:
65
  print("An error occurred:", str(e))
66
+ return str(e)
67
  return None
68
 
69