Browse Source

#42

feature/042
みてるぞ 2 weeks ago
parent
commit
1f46dc3974
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      main.py

+ 5
- 3
main.py View File

@@ -991,7 +991,8 @@ class NicoVideo (Video):
comments = fetch_comments (video_code)
fetch_nico_video (video_code, comments)
super ().__init__ (game, './outputs/output.mp4')
except Exception:
except Exception as ex:
print (ex)
super ().__init__ (game, './assets/snack_time.mp4')
(self.width, self.height) = (CWindow.HEIGHT * 16 // 9, CWindow.HEIGHT)
(self.x, self.y) = ((CWindow.WIDTH - self.width) / 2, 0)
@@ -1043,7 +1044,8 @@ def fetch_nico_video (
'-crf', '18',
'-preset', 'veryfast',
'-c:a', 'copy',
'./outputs/output.mp4'],
'./outputs/output.mp4',
'-y'],
check = True)


@@ -1051,7 +1053,7 @@ def fetch_comments (
video_code: str,
) -> list[CommentDict]:
result = subprocess.run (
['python3', 'get_kiriban_list.py', video_code],
['python3', 'get_comments_by_video_code.py', video_code],
cwd = NIZIKA_NICO_DIR,
env = os.environ,
capture_output = True,


Loading…
Cancel
Save