Some linting.
This commit is contained in:
parent
21a81fd62c
commit
491992b606
9 changed files with 21 additions and 10 deletions
|
@ -2,3 +2,9 @@ from . import common
|
|||
from . import endpoints
|
||||
|
||||
site = common.site
|
||||
|
||||
__all__ = [
|
||||
'common',
|
||||
'endpoints',
|
||||
'site',
|
||||
]
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
from . import basic_endpoints
|
||||
from . import channel_endpoints
|
||||
from . import video_endpoints
|
||||
|
||||
__all__ = [
|
||||
'basic_endpoints',
|
||||
'channel_endpoints',
|
||||
'video_endpoints',
|
||||
]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import flask; from flask import request
|
||||
import itertools
|
||||
import traceback
|
||||
|
||||
from voussoirkit import flasktools
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import flask; from flask import request
|
||||
import traceback
|
||||
|
||||
from voussoirkit import flasktools
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import argparse
|
||||
import os
|
||||
import sqlite3
|
||||
import sys
|
||||
|
||||
import ycdl
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import argparse
|
||||
import os
|
||||
import sqlite3
|
||||
import sys
|
||||
|
||||
|
|
|
@ -2,3 +2,10 @@ from . import exceptions
|
|||
from . import helpers
|
||||
from . import ycdldb
|
||||
from . import ytapi
|
||||
|
||||
__all__ = [
|
||||
'exceptions',
|
||||
'helpers',
|
||||
'ycdldb',
|
||||
'ytapi',
|
||||
]
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import json
|
||||
import os
|
||||
import sqlite3
|
||||
import traceback
|
||||
|
||||
from . import constants
|
||||
from . import exceptions
|
||||
|
|
|
@ -4,8 +4,6 @@ import isodate
|
|||
from voussoirkit import gentools
|
||||
from voussoirkit import vlogging
|
||||
|
||||
from . import helpers
|
||||
|
||||
def int_none(x):
|
||||
if x is None:
|
||||
return None
|
||||
|
@ -46,7 +44,8 @@ class Video:
|
|||
self.comment_count = int_none(statistics.get('commentCount'))
|
||||
|
||||
thumbnails = snippet['thumbnails']
|
||||
best_thumbnail = max(thumbnails, key=lambda x: thumbnails[x]['width'] * thumbnails[x]['height'])
|
||||
ranker = lambda key: thumbnails[key]['width'] * thumbnails[key]['height']
|
||||
best_thumbnail = max(thumbnails, key=ranker)
|
||||
self.thumbnail = thumbnails[best_thumbnail]
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Reference in a new issue