diff --git a/tools/process_new_vids/test/__init__.py b/tools/process_new_vids/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/process_new_vids/test/test_transcribe_worker.py b/tools/process_new_vids/test/test_transcribe_worker.py new file mode 100644 index 0000000..49f1b4a --- /dev/null +++ b/tools/process_new_vids/test/test_transcribe_worker.py @@ -0,0 +1,10 @@ +import unittest +from pytubefix import YouTube +import transcribe_worker + +class TestTranscribeWorker(unittest.TestCase): + def test_transcribe_worker(self): + BOARD_MEETING_MAY_13_2025 = 'cIVuHr9ub-Y' + video = YouTube(f"https://www.youtube.com/watch?v={BOARD_MEETING_MAY_13_2025}") + desc = transcribe_worker.get_description(video) + self.assertEqual(desc, "Seattle Public Schools") diff --git a/tools/process_new_vids/transcribe_worker.py b/tools/process_new_vids/transcribe_worker.py index 0d24bdd..4fe7574 100644 --- a/tools/process_new_vids/transcribe_worker.py +++ b/tools/process_new_vids/transcribe_worker.py @@ -21,8 +21,8 @@ WORKING_DIR = '/tmp/workspace/app/transcribe' AUTH_PARAMS = { - 'user_id': os.environ['CONTAINER_ID'], - 'auth_code': os.environ['API_PASSWORD'], + 'user_id': os.environ.get('CONTAINER_ID', 'container_id_unset'), + 'auth_code': os.environ.get('API_PASSWORD', 'api_password_unset'), }