Channel view: Channel info + videos
This commit is contained in:
parent
93f71a8ea8
commit
deb0043244
@ -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
|
||||
|
@ -21,10 +21,6 @@
|
||||
{{video.timeStamp}}
|
||||
</span>
|
||||
<span>
|
||||
<a href="{{video.videoUrl}}">
|
||||
<i class="share square outline icon"></i>
|
||||
Open
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
@ -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 %}
|
Reference in New Issue
Block a user