Channel view: Channel info + videos

This commit is contained in:
pluja 2020-08-23 11:03:49 +02:00
parent 93f71a8ea8
commit deb0043244
3 changed files with 9 additions and 16 deletions

View File

@ -291,9 +291,9 @@ def channel(id):
data = requests.get('https://www.youtube.com/feeds/videos.xml?channel_id={id}'.format(id=id)) data = requests.get('https://www.youtube.com/feeds/videos.xml?channel_id={id}'.format(id=id))
data = feedparser.parse(data.content) data = feedparser.parse(data.content)
channel = YoutubeSearch.channelInfo(id) channelData = YoutubeSearch.channelInfo(id)
return render_template('channel.html', channel=channel) return render_template('channel.html', channel=channelData[0], videos=channelData[1])
@app.route('/watch', methods=['GET']) @app.route('/watch', methods=['GET'])
@login_required @login_required

View File

@ -21,10 +21,6 @@
{{video.timeStamp}} {{video.timeStamp}}
</span> </span>
<span> <span>
<a href="{{video.videoUrl}}">
<i class="share square outline icon"></i>
Open
</a>
</span> </span>
</div> </div>
</div> </div>

View File

@ -19,18 +19,15 @@
</div> </div>
</div> </div>
<div class="ui one column grid" id="card-container"> <br>
<br>
<!--{% if not posts %} {% if not videos %}
{% include '_empty_feed.html' %} {% include '_empty_feed.html' %}
{% else %} {% else %}
{% for post in posts %} <div class="ui centered cards">
{% if post.isRT %} {% for video in videos %}
{% include '_post.html' %} {% include '_video_item.html' %}
{% else %}
{% include '_post_nort.html' %}
{% endif %}
{% endfor %} {% endfor %}
{% endif %}-->
</div> </div>
{% endif %}
{% endblock %} {% endblock %}