Detect livestreams on Youtube video search and feed
This commit is contained in:
parent
40f11fc0c6
commit
b6bb2a3cfa
@ -667,7 +667,6 @@ def getPosts(account):
|
||||
if userFeed != []:
|
||||
for post in userFeed[:-1]:
|
||||
date_time_str = post.find('span', attrs={'class':'tweet-date'}).find('a')['title'].replace(",","")
|
||||
time = datetime.datetime.now() - datetime.datetime.strptime(date_time_str, '%d/%m/%Y %H:%M:%S')
|
||||
|
||||
if post.find('div', attrs={'class':'pinned'}):
|
||||
if post.find('div', attrs={'class':'pinned'}).find('span', attrs={'icon-pin'}):
|
||||
|
@ -3,7 +3,11 @@
|
||||
<img alt="Thumbnail" src="/img/{{video.videoThumb.replace('/', '~')}}">
|
||||
</div>
|
||||
<div class="content">
|
||||
{% if video.views == "Livestream" %}
|
||||
<a class="video-title break-word" href="#">{{video.videoTitle}}</a>
|
||||
{% else %}
|
||||
<a class="video-title break-word" href="{{url_for('watch', v=video.id, _method='GET')}}">{{video.videoTitle}}</a>
|
||||
{% endif %}
|
||||
<div class="meta">
|
||||
<a class="break-word" href="{{url_for('channel', id=video.channelId)}}">{{video.channelName}}</a>
|
||||
</div>
|
||||
@ -12,14 +16,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra content">
|
||||
{% if video.views == "Livestream" %}
|
||||
<span class="right floated">
|
||||
<i class="red circle icon"></i>
|
||||
{{video.views}}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="right floated">
|
||||
<i class="eye icon"></i>
|
||||
{{video.views}}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if video.timeStamp == "Scheduled" %}
|
||||
<span class="right floated">
|
||||
<i class="blue clock icon"></i>
|
||||
{{video.timeStamp}}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="right floated">
|
||||
<i class="clock icon"></i>
|
||||
{{video.timeStamp}}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span>
|
||||
</span>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user