diff --git a/video_creation/data/videos.json b/video_creation/data/videos.json index 0637a08..5c92929 100644 --- a/video_creation/data/videos.json +++ b/video_creation/data/videos.json @@ -1 +1,10 @@ -[] \ No newline at end of file +[ + { + "subreddit": "AskReddit", + "id": "vwgslz", + "time": "1657573375", + "background_credit": "bbswitzer", + "reddit_title": "Which singer should never have been famous", + "filename": "Which singer should never have been famous.mp4" + } +] \ No newline at end of file diff --git a/video_creation/final_video.py b/video_creation/final_video.py index c13026f..46513b8 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -93,7 +93,7 @@ def make_final_video( indexes_for_videos = list() for idx, audio in track( - enumerate(indexes_of_clips, start=1), + enumerate(indexes_of_clips), description='Gathering audio clips...', ): temp_audio_clip = create_audio_clip( @@ -143,9 +143,9 @@ def make_final_video( image_clips.append( create_image_clip( f'comment_{photo_idx}', - audio_clips[photo_idx].start, - audio_clips[photo_idx].end, - audio_clips[photo_idx].duration + audio_clips[photo_idx + 1].start, + audio_clips[photo_idx + 1].end, + audio_clips[photo_idx + 1].duration ) ) diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index 81c7850..63be15f 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -85,7 +85,12 @@ class Browser: """ default_Viewport: dict = attrib( validator=instance_of(dict), - default=dict(), + default={ + 'defaultViewport': { + 'width': 500, + 'height': 900, + }, + }, kw_only=True, ) browser: Optional[BrowserCls] = attrib( @@ -94,10 +99,6 @@ class Browser: kw_only=True, ) - def __attrs_post_init__(self): - if self.default_Viewport.__len__() == 0: - self.default_Viewport['isLandscape'] = True - async def get_browser( self, ) -> None: