Update requirements.txt.

This commit is contained in:
voussoir 2021-04-04 11:16:44 -07:00
parent 10f67cae4b
commit d185a3f451
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
3 changed files with 12 additions and 1 deletions

View file

@ -56,6 +56,8 @@ def after_request(response):
####################################################################################################
####################################################################################################
# These functions will be called by the launcher, flask_dev, flask_prod.
def init_ycdldb(*args, **kwargs):
global ycdldb
ycdldb = ycdl.ycdldb.YCDLDB(*args, **kwargs)

View file

@ -1,5 +1,12 @@
# For parsing RSS
bs4
# For running the webserver
flask
gevent
https://github.com/voussoir/else/raw/master/_voussoirkit/voussoirkit.zip
# For parsing Youtube API's published dates and duration strings
isodate
# My own variety toolkit
https://github.com/voussoir/else/raw/master/_voussoirkit/voussoirkit.zip

View file

@ -29,6 +29,7 @@ class Video:
self.description = snippet.get('description', '')
self.author_id = snippet['channelId']
self.author_name = snippet.get('channelTitle', self.author_id)
# Something like '2016-10-01T21:00:01'
self.published_string = snippet['publishedAt']
self.published = isodate.parse_datetime(self.published_string).timestamp()
@ -37,6 +38,7 @@ class Video:
self.live_broadcast = None
self.tags = snippet.get('tags', [])
# Something like 'PT10M25S'
self.duration = isodate.parse_duration(content_details['duration']).seconds
self.views = int_none(statistics.get('viewCount', None))
self.likes = int_none(statistics.get('likeCount', 0))