Skip to content

Commit

Permalink
localized import webvtt
Browse files Browse the repository at this point in the history
  • Loading branch information
colobas committed Feb 15, 2024
1 parent b6cebe7 commit 05504bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion process_debates.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import bs4
import requests
import webvtt

from video_utils import upload_to_gdrive, get_file_ids, direct_link
from speaker_party_conversion import speaker_party_conversion
Expand All @@ -27,6 +26,8 @@ def convert_to_seconds(time):


def webvtt_to_json(vtt_path, output_path):
import webvtt

# adapted from: https://github.com/simonw/webvtt-to-json/blob/main/webvtt_to_json/cli.py
with open(vtt_path, "r") as vtt_file:
captions = webvtt.read_buffer(vtt_file)
Expand Down

0 comments on commit 05504bd

Please sign in to comment.