Fixed: spaces breaking twitter search
This commit is contained in:
parent
a5a8b78ba2
commit
b06f96f9c4
@ -471,7 +471,8 @@ def isTwitterUser(username):
|
||||
return True
|
||||
|
||||
def twitterUserSearch(terms):
|
||||
response = urllib.request.urlopen('{instance}search?f=users&q={user}'.format(instance=nitterInstance, user=terms)).read()
|
||||
|
||||
response = urllib.request.urlopen('{instance}search?f=users&q={user}'.format(instance=nitterInstance, user=urllib.parse.quote(terms))).read()
|
||||
html = BeautifulSoup(str(response), "lxml")
|
||||
|
||||
results = []
|
||||
@ -531,12 +532,13 @@ def getFeed(urls):
|
||||
userFeed = html.find_all('div', attrs={'class':'timeline-item'})
|
||||
if userFeed != []:
|
||||
for post in userFeed[:-1]:
|
||||
if post.find('div', attrs={'class':'pinned'}):
|
||||
if post.find('div', attrs={'class':'pinned'}).find('span', attrs={'icon-pin'}):
|
||||
continue
|
||||
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 time.days >= 14:
|
||||
if time.days >= 11:
|
||||
continue
|
||||
|
||||
if post.find('div', attrs={'class':'pinned'}):
|
||||
if post.find('div', attrs={'class':'pinned'}).find('span', attrs={'icon-pin'}):
|
||||
continue
|
||||
|
||||
newPost = twitterPost()
|
||||
|
@ -1,3 +1,21 @@
|
||||
.video-js-responsive-container.vjs-hd {
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
.video-js-responsive-container.vjs-sd {
|
||||
padding-top: 75%;
|
||||
}
|
||||
.video-js-responsive-container {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.video-js-responsive-container .video-js {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.para-light-grey{
|
||||
background-color: rgb(250, 82, 82);
|
||||
}
|
||||
|
@ -4,13 +4,15 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="ui text container">
|
||||
<div class="video-js-responsive-container vjs-hd">
|
||||
<video class="video-js vjs-default-skin"
|
||||
data-setup='{ "playbackRates": [0.5, 1, 1.25,1.5, 2] }'
|
||||
width="720%"
|
||||
width="1080"
|
||||
controls
|
||||
preload="auto">
|
||||
<source src="/stream?v={{video.id}}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<div class="ui segments">
|
||||
<div class="ui segment">
|
||||
|
Reference in New Issue
Block a user