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 = 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'])
@login_required

View File

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

View File

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