From f2eefbe5a542f1a6fa8404228c2a9425054765a8 Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 18 May 2022 18:21:00 +0100 Subject: [PATCH] Fixed DynamoDB integration --- twitfix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index f27f8a4..f46e93d 100644 --- a/twitfix.py +++ b/twitfix.py @@ -292,7 +292,7 @@ def link_to_vnf_from_api(video_link): twid = int(re.sub(r'\?.*$','',video_link.rsplit("/", 1)[-1])) # gets the tweet ID as a int from the passed url tweet = twitter_api.statuses.show(_id=twid, tweet_mode="extended") # For when I need to poke around and see what a tweet looks like - #print(tweet) + print(tweet) imgs = ["","","","", ""] print(" ➤ [ + ] Tweet Type: " + tweetType(tweet)) # Check to see if tweet has a video, if not, make the url passed to the VNF the first t.co link in the tweet @@ -416,7 +416,7 @@ def getVnfFromLinkCache(video_link): ) if 'Item' in response: print("Link located in dynamodb cache") - vnf = response['Item'] + vnf = response['Item']['vnf'] return vnf else: print(" ➤ [ X ] Link not in dynamodb cache")