Update links and filename
This commit is contained in:
parent
a0ccc2aa4c
commit
df7a62649b
@ -96,6 +96,7 @@ class twitterPost():
|
||||
class ytPost():
|
||||
channelName = 'Error'
|
||||
channelUrl = '#'
|
||||
channelId = '@'
|
||||
videoUrl = '#'
|
||||
videoTitle = '#'
|
||||
videoThumb = '#'
|
||||
|
@ -207,8 +207,8 @@ def youtube():
|
||||
videos = getYoutubePosts(ids)
|
||||
if videos:
|
||||
videos.sort(key=lambda x: x.date, reverse=True)
|
||||
print("--- {} seconds fetching invidious feed---".format(time.time() - start_time))
|
||||
return render_template('invidious.html', videos=videos)
|
||||
print("--- {} seconds fetching youtube feed---".format(time.time() - start_time))
|
||||
return render_template('youtube.html', videos=videos)
|
||||
|
||||
@app.route('/ytsearch', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
@ -311,6 +311,7 @@ def watch():
|
||||
'viewCount':data['view_count'],
|
||||
'author':data['uploader'],
|
||||
'authorUrl':data['uploader_url'],
|
||||
'channelId': data['uploader_id'],
|
||||
'id':id,
|
||||
'averageRating': str((float(data['average_rating'])/5)*100)
|
||||
}
|
||||
@ -523,6 +524,7 @@ def getYoutubePosts(ids):
|
||||
video.date = vid.published_parsed
|
||||
video.timeStamp = getTimeDiff(vid.published_parsed)
|
||||
video.channelName = vid.author_detail.name
|
||||
video.channelId = vid.yt_channelid
|
||||
video.channelUrl = vid.author_detail.href
|
||||
video.id = vid.yt_videoid
|
||||
video.videoTitle = vid.title
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="content">
|
||||
<a class="video-title" href="{{url_for('watch', v=video.id, _method='GET')}}">{{video.videoTitle}}</a>
|
||||
<div class="meta">
|
||||
<a href="{{video.channelUrl}}">{{video.channelName}}</a>
|
||||
<a href="{{url_for('channel', id=video.channelId)}}">{{video.channelName}}</a>
|
||||
</div>
|
||||
<div class="description">
|
||||
{{video.description}}
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<div style="margin-top: 2em;" class="ui center aligned grid">
|
||||
<div class="two wide column">
|
||||
<a target="_blank" href="{{video.authorUrl}}" class="ui label">
|
||||
<a target="_blank" href="{{ url_for('channel', id=video.channelId)}}" class="ui label">
|
||||
{%if video.author.__len__() > 8%}
|
||||
<i class="user icon"></i> {{video.author[0:10]+'...'}}
|
||||
{%else%}
|
||||
|
Reference in New Issue
Block a user