diff --git a/app/routes.py b/app/routes.py index 487dc18..eed2cd9 100644 --- a/app/routes.py +++ b/app/routes.py @@ -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,13 +532,14 @@ def getFeed(urls): userFeed = html.find_all('div', attrs={'class':'timeline-item'}) 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 time.days >= 11: + continue + 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: - continue newPost = twitterPost() newPost.op = post.find('a', attrs={'class':'username'}).text diff --git a/app/static/styles.css b/app/static/styles.css index 5e82e1b..2803614 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -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); } diff --git a/app/templates/video.html b/app/templates/video.html index 2bdebda..44c9d54 100644 --- a/app/templates/video.html +++ b/app/templates/video.html @@ -4,13 +4,15 @@ {% extends "base.html" %} {% block content %}
-