Browse Source

#1 当日にて,より小さいキリ番は祝はなぃやぅに

main
みてるぞ 2 weeks ago
parent
commit
0dd27b4ec7
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      nico.py

+ 7
- 5
nico.py View File

@@ -25,11 +25,11 @@ CONFIG: dict[str, DbConfig] = { 'mysql': { 'driver': 'mysql',
DB = DatabaseManager (CONFIG)
Model.set_connection_resolver (DB)

KIRIBAN_VIEWS_COUNTS: set[int] = { *range (1_000, 10_000, 1_000),
*range (10_000, 1_000_001, 10_000),
194, 245, 510, 810, 114_514, 1_940, 2_450, 5_100,
19_400, 24_500, 51_000, 93_194, 2_424, 242_424, 1_919, 4_545,
194_245, 245_194, 510_245 }
KIRIBAN_VIEWS_COUNTS: list[int] = sorted ({ *range (1_000, 10_000, 1_000),
*range (10_000, 1_000_001, 10_000),
194, 245, 510, 810, 114_514, 1_940, 2_450, 5_100,
19_400, 24_500, 51_000, 93_194, 2_424, 242_424, 1_919,
4_545, 194_245, 245_194, 510_245 })

class VideoInfo (TypedDict):
contentId: str
@@ -143,6 +143,8 @@ def get_kiriban_list (
.where ('views_count', '>=', kiriban_views_count)
.get ()) })
for code in targets:
if code in [kiriban[1]['contentId'] for kiriban in kiriban_list]:
continue
video_info = get_video_info (code)
if video_info is not None:
kiriban_list.append ((kiriban_views_count, video_info,


Loading…
Cancel
Save