smcrone commited on
Commit
a67e411
1 Parent(s): de65a45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -344,6 +344,8 @@ def on_receipt_of_tweet_query(request:str,client:tw.Client):
344
  # If URL is provided by the end-user, strip out the tweet ID.
345
  if '/' in request:
346
  request = request.split('/')[-1]
 
 
347
  # Collect tweet data -- interrupt if invalid input provided.
348
  tweet = client.get_tweets(ids=request,
349
  expansions=['author_id'],
 
344
  # If URL is provided by the end-user, strip out the tweet ID.
345
  if '/' in request:
346
  request = request.split('/')[-1]
347
+ if '?' in request:
348
+ request = request.split('?')[0]
349
  # Collect tweet data -- interrupt if invalid input provided.
350
  tweet = client.get_tweets(ids=request,
351
  expansions=['author_id'],