diff --git a/templates/default.html b/templates/default.html new file mode 100644 index 0000000..375fdac --- /dev/null +++ b/templates/default.html @@ -0,0 +1,14 @@ +{% extends 'base.html' %} + +{% block head %} + TwitFix + + + + + +{% endblock %} + +{% block body %} + You will be redirected to this projects github page in a moment. +{% endblock %} \ No newline at end of file diff --git a/twitfix.py b/twitfix.py index 5ec71ad..0bac35d 100644 --- a/twitfix.py +++ b/twitfix.py @@ -43,12 +43,12 @@ def twitfix(subpath): except Exception: # Just to keep from 500s that are messy print(Exception) - return "Bad twitter link, try again" + return render_template('default.html', message="Failed to scan your twitter link! ( there is a chance I ran out of api calls.. wait a bit and try again )") return render_template('index.html', vidurl=result['url'], tweet=result['description'], pic=result['thumbnail'], user=result['uploader'], tweeturl=twitter_url) else: print("Link invalid") - return "Please use a twitter link" + return render_template('default.html', message="Please use a twitter link!") @app.route('/info/') def info(subpath):