diff --git a/app/routes.py b/app/routes.py index 7a49458..6082a35 100644 --- a/app/routes.py +++ b/app/routes.py @@ -285,6 +285,16 @@ def ytunfollow(channelId): flash("There was an error unfollowing the user. Try again.") return redirect(url_for('ytsearch')) +@app.route('/channel/', methods=['GET']) +@login_required +def channel(id): + data = requests.get('https://www.youtube.com/feeds/videos.xml?channel_id={id}'.format(id=id)) + data = feedparser.parse(data.content) + + channel = YoutubeSearch.channelInfo(id) + + return render_template('channel.html', channel=channel) + @app.route('/watch', methods=['GET']) @login_required def watch(): diff --git a/app/templates/channel.html b/app/templates/channel.html new file mode 100644 index 0000000..1ca1271 --- /dev/null +++ b/app/templates/channel.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% block content %} +
+ +
+
+
+ + +
+ + +
+{% endblock %} \ No newline at end of file