Misc. changes and coverage excludes

This commit is contained in:
Dylan
2022-09-28 23:50:12 +01:00
parent 23b68e4634
commit 6e1f37eabd
5 changed files with 9 additions and 13 deletions

View File

@ -158,7 +158,7 @@ def dir(sub_path):
return redirect(url, 301)
@app.route('/favicon.ico')
def favicon():
def favicon(): # pragma: no cover
return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico',mimetype='image/vnd.microsoft.icon')
@app.route("/rendercombined.jpg")
@ -273,13 +273,6 @@ def tweetInfo(url, tweet="", desc="", thumb="", uploader="", screen_name="", pfp
}
return vnf
def get_tweet_data_from_api(video_link):
print(" ➤ [ + ] Attempting to download tweet info from Twitter API")
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")
#print(tweet) # For when I need to poke around and see what a tweet looks like
return tweet
def link_to_vnf_from_tweet_data(tweet,video_link):
imgs = ["","","","", ""]
print(" ➤ [ + ] Tweet Type: " + tweetType(tweet))