Update requirements.txt.
This commit is contained in:
parent
10f67cae4b
commit
d185a3f451
3 changed files with 12 additions and 1 deletions
|
@ -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):
|
def init_ycdldb(*args, **kwargs):
|
||||||
global ycdldb
|
global ycdldb
|
||||||
ycdldb = ycdl.ycdldb.YCDLDB(*args, **kwargs)
|
ycdldb = ycdl.ycdldb.YCDLDB(*args, **kwargs)
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
|
# For parsing RSS
|
||||||
bs4
|
bs4
|
||||||
|
|
||||||
|
# For running the webserver
|
||||||
flask
|
flask
|
||||||
gevent
|
gevent
|
||||||
https://github.com/voussoir/else/raw/master/_voussoirkit/voussoirkit.zip
|
|
||||||
|
# For parsing Youtube API's published dates and duration strings
|
||||||
isodate
|
isodate
|
||||||
|
|
||||||
|
# My own variety toolkit
|
||||||
|
https://github.com/voussoir/else/raw/master/_voussoirkit/voussoirkit.zip
|
||||||
|
|
|
@ -29,6 +29,7 @@ class Video:
|
||||||
self.description = snippet.get('description', '')
|
self.description = snippet.get('description', '')
|
||||||
self.author_id = snippet['channelId']
|
self.author_id = snippet['channelId']
|
||||||
self.author_name = snippet.get('channelTitle', self.author_id)
|
self.author_name = snippet.get('channelTitle', self.author_id)
|
||||||
|
|
||||||
# Something like '2016-10-01T21:00:01'
|
# Something like '2016-10-01T21:00:01'
|
||||||
self.published_string = snippet['publishedAt']
|
self.published_string = snippet['publishedAt']
|
||||||
self.published = isodate.parse_datetime(self.published_string).timestamp()
|
self.published = isodate.parse_datetime(self.published_string).timestamp()
|
||||||
|
@ -37,6 +38,7 @@ class Video:
|
||||||
self.live_broadcast = None
|
self.live_broadcast = None
|
||||||
self.tags = snippet.get('tags', [])
|
self.tags = snippet.get('tags', [])
|
||||||
|
|
||||||
|
# Something like 'PT10M25S'
|
||||||
self.duration = isodate.parse_duration(content_details['duration']).seconds
|
self.duration = isodate.parse_duration(content_details['duration']).seconds
|
||||||
self.views = int_none(statistics.get('viewCount', None))
|
self.views = int_none(statistics.get('viewCount', None))
|
||||||
self.likes = int_none(statistics.get('likeCount', 0))
|
self.likes = int_none(statistics.get('likeCount', 0))
|
||||||
|
|
Loading…
Reference in a new issue