{"id":20346638,"url":"https://github.com/arthurfdlr/yt-cc","last_synced_at":"2026-06-09T05:03:10.657Z","repository":{"id":236593268,"uuid":"792924718","full_name":"ArthurFDLR/yt-cc","owner":"ArthurFDLR","description":"💬 YoutubeCC - Parse JSON3 Youtube Closed Captions","archived":false,"fork":false,"pushed_at":"2024-05-09T05:01:25.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T15:48:31.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArthurFDLR.png","metadata":{"files":{"readme":"README.ipynb","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-27T23:56:30.000Z","updated_at":"2024-05-09T05:01:28.000Z","dependencies_parsed_at":"2024-04-28T00:30:58.122Z","dependency_job_id":"c6bc6d9d-7841-466a-844c-b5f05f4e2ec6","html_url":"https://github.com/ArthurFDLR/yt-cc","commit_stats":null,"previous_names":["arthurfdlr/yt-cc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArthurFDLR/yt-cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Fyt-cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Fyt-cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Fyt-cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Fyt-cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArthurFDLR","download_url":"https://codeload.github.com/ArthurFDLR/yt-cc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurFDLR%2Fyt-cc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34092266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T22:13:42.259Z","updated_at":"2026-06-09T05:03:10.638Z","avatar_url":"https://github.com/ArthurFDLR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# YoutubeCC (`yt-cc`) - A Youtube Closed Captions (`.json3`) parser\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"`yt-cc` is a Python library that parses Youtube Closed Captions (`.json3`) files. It is a simple and easy-to-use library that can be used to query precise parts of the video transcript or iterate over the entire transcript.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"%load_ext autoreload\\n\",\n    \"%autoreload 2\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from pathlib import Path\\n\",\n    \"\\n\",\n    \"from yt_dlp import YoutubeDL\\n\",\n    \"from yt_cc import YoutubeCC\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 3,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"DATA_PATH = Path.cwd() / \\\".tmp\\\"\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Downloading the Closed Captions with `yt-dlp`\\n\",\n    \"\\n\",\n    \"To download the closed captions of a Youtube video, you can use the `yt-dlp` command-line tool. You can install `yt-dlp` using `pip`:\\n\",\n    \"\\n\",\n    \"```bash\\n\",\n    \"pip install yt-dlp\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"To download the closed captions of a Youtube video in the `.json3` format, you can use the following command:\\n\",\n    \"\\n\",\n    \"```bash\\n\",\n    \"yt-dlp --write-auto-sub --skip-download --sub-format json3 \u003cvideo-url\u003e\\n\",\n    \"```\\n\",\n    \"\\n\",\n    \"You can also download the closed captions with the `yt-dlp` Python API:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[youtube] Extracting URL: https://www.youtube.com/watch?v=oHWuv1Aqrzk\\n\",\n      \"[youtube] oHWuv1Aqrzk: Downloading webpage\\n\",\n      \"[youtube] oHWuv1Aqrzk: Downloading ios player API JSON\\n\",\n      \"[youtube] oHWuv1Aqrzk: Downloading android player API JSON\\n\"\n     ]\n    },\n    {\n     \"name\": \"stderr\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"WARNING: [youtube] Skipping player responses from android clients (got player responses for video \\\"aQvGIIdgFDM\\\" instead of \\\"oHWuv1Aqrzk\\\")\\n\"\n     ]\n    },\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[youtube] oHWuv1Aqrzk: Downloading m3u8 information\\n\",\n      \"[info] oHWuv1Aqrzk: Downloading subtitles: en\\n\",\n      \"[info] oHWuv1Aqrzk: Downloading 1 format(s): 248+251\\n\",\n      \"Deleting existing file /home/arthur/Documents/02.workspace/02.active/clips-analytics/yt-cc/.tmp/oHWuv1Aqrzk.en.json3\\n\",\n      \"[info] Writing video subtitles to: /home/arthur/Documents/02.workspace/02.active/clips-analytics/yt-cc/.tmp/oHWuv1Aqrzk.en.json3\\n\",\n      \"[download] Destination: /home/arthur/Documents/02.workspace/02.active/clips-analytics/yt-cc/.tmp/oHWuv1Aqrzk.en.json3\\n\",\n      \"[download] 100% of   71.66KiB in 00:00:00 at 1.28MiB/s\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"PosixPath('/home/arthur/Documents/02.workspace/02.active/clips-analytics/yt-cc/.tmp/oHWuv1Aqrzk.en.json3')\"\n      ]\n     },\n     \"execution_count\": 4,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"YoutubeDL(\\n\",\n    \"    params = dict(\\n\",\n    \"        paths=dict(home=str(DATA_PATH)),\\n\",\n    \"        skip_download=True,\\n\",\n    \"        outtmpl=\\\"%(id)s.%(ext)s\\\",\\n\",\n    \"        subtitlesformat=\\\"json3\\\",\\n\",\n    \"        writeautomaticsub=True,\\n\",\n    \"    )\\n\",\n    \").download([\\\"https://www.youtube.com/watch?v=oHWuv1Aqrzk\\\"])\\n\",\n    \"\\n\",\n    \"yt_cc_file_path = next(DATA_PATH.glob(\\\"*.json3\\\"))\\n\",\n    \"yt_cc_file_path\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"## Parse the Closed Captions with `yt-cc`\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"\\n\",\n       \"        \u003ch3\u003eYoutubeCC\u003c/h3\u003e\\n\",\n       \"        \u003cul\u003e\\n\",\n       \"            \u003cli\u003eFile: /home/arthur/Documents/02.workspace/02.active/clips-analytics/yt-cc/.tmp/oHWuv1Aqrzk.en.json3\u003c/li\u003e\\n\",\n       \"            \u003cli\u003elines: 202\u003c/li\u003e\\n\",\n       \"            \u003cli\u003eSegments: 768\u003c/li\u003e\\n\",\n       \"        \u003c/ul\u003e\\n\",\n       \"        \"\n      ],\n      \"text/plain\": [\n       \"YoutubeCC(file=/home/arthur/Documents/02.workspace/02.active/clips-analytics/yt-cc/.tmp/oHWuv1Aqrzk.en.json3, lines=202, segments=768)\"\n      ]\n     },\n     \"execution_count\": 5,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"youtube_caption = YoutubeCC(yt_cc_file_path)\\n\",\n    \"youtube_caption\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 6,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"LineCC(event_id=1.0, start_time_ms=0.0, duration_ms=218599.0, window_id=nan, window_style_id=1.0, window_position_id=1.0, append=nan, segments=[])\\n\",\n      \"LineCC(event_id=nan, start_time_ms=2820.0, duration_ms=5279.0, window_id=1.0, window_style_id=nan, window_position_id=nan, append=nan, segments=['is', ' there', ' cool', ' small', ' projects', ' like', ' uh'])\\n\",\n      \"LineCC(event_id=nan, start_time_ms=5510.0, duration_ms=2589.0, window_id=1.0, window_style_id=nan, window_position_id=nan, append=1.0, segments=['\\\\n'])\\n\",\n      \"LineCC(event_id=nan, start_time_ms=5520.0, duration_ms=6180.0, window_id=1.0, window_style_id=nan, window_position_id=nan, append=nan, segments=['archive', ' sanity', ' and', ' and', ' so', ' on', ' that', \\\" you're\\\"])\\n\",\n      \"LineCC(event_id=nan, start_time_ms=8089.0, duration_ms=3611.0, window_id=1.0, window_style_id=nan, window_position_id=nan, append=1.0, segments=['\\\\n'])\\n\",\n      \"LineCC(event_id=nan, start_time_ms=8099.0, duration_ms=5580.0, window_id=1.0, window_style_id=nan, window_position_id=nan, append=nan, segments=['thinking', ' about', ' the', ' the', ' the', ' the', ' world', ' the'])\\n\",\n      \"LineCC(event_id=nan, start_time_ms=11690.0, duration_ms=1989.0, window_id=1.0, window_style_id=nan, window_position_id=nan, append=1.0, segments=['\\\\n'])\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"\\n\",\n    \"for i, line_cc in enumerate(youtube_caption):\\n\",\n    \"    print(line_cc)\\n\",\n    \"    if i \u003e 5:\\n\",\n    \"        break\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 7,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"\u003cdiv\u003e\\n\",\n       \"\u003cstyle scoped\u003e\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"\u003c/style\u003e\\n\",\n       \"\u003ctable border=\\\"1\\\" class=\\\"dataframe\\\"\u003e\\n\",\n       \"  \u003cthead\u003e\\n\",\n       \"    \u003ctr style=\\\"text-align: right;\\\"\u003e\\n\",\n       \"      \u003cth\u003e\u003c/th\u003e\\n\",\n       \"      \u003cth\u003eevent_id\u003c/th\u003e\\n\",\n       \"      \u003cth\u003estart_time_ms\u003c/th\u003e\\n\",\n       \"      \u003cth\u003eduration_ms\u003c/th\u003e\\n\",\n       \"      \u003cth\u003ewindow_id\u003c/th\u003e\\n\",\n       \"      \u003cth\u003ewindow_style_id\u003c/th\u003e\\n\",\n       \"      \u003cth\u003ewindow_position_id\u003c/th\u003e\\n\",\n       \"      \u003cth\u003eappend\u003c/th\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"  \u003c/thead\u003e\\n\",\n       \"  \u003ctbody\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e0\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e218599.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e1\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e2820\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e5279.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e2\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e5510\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e2589.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e3\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e5520\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e6180.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e4\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e8089\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e3611.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e...\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e197\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e212580\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e3900.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e198\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e214850\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1630.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e199\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e214860\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e3739.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e200\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216470\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e2129.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e201\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216480\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e2119.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"  \u003c/tbody\u003e\\n\",\n       \"\u003c/table\u003e\\n\",\n       \"\u003cp\u003e202 rows × 7 columns\u003c/p\u003e\\n\",\n       \"\u003c/div\u003e\"\n      ],\n      \"text/plain\": [\n       \"     event_id  start_time_ms  duration_ms  window_id  window_style_id  \\\\\\n\",\n       \"0         1.0              0     218599.0        NaN              1.0   \\n\",\n       \"1         NaN           2820       5279.0        1.0              NaN   \\n\",\n       \"2         NaN           5510       2589.0        1.0              NaN   \\n\",\n       \"3         NaN           5520       6180.0        1.0              NaN   \\n\",\n       \"4         NaN           8089       3611.0        1.0              NaN   \\n\",\n       \"..        ...            ...          ...        ...              ...   \\n\",\n       \"197       NaN         212580       3900.0        1.0              NaN   \\n\",\n       \"198       NaN         214850       1630.0        1.0              NaN   \\n\",\n       \"199       NaN         214860       3739.0        1.0              NaN   \\n\",\n       \"200       NaN         216470       2129.0        1.0              NaN   \\n\",\n       \"201       NaN         216480       2119.0        1.0              NaN   \\n\",\n       \"\\n\",\n       \"     window_position_id  append  \\n\",\n       \"0                   1.0     NaN  \\n\",\n       \"1                   NaN     NaN  \\n\",\n       \"2                   NaN     1.0  \\n\",\n       \"3                   NaN     NaN  \\n\",\n       \"4                   NaN     1.0  \\n\",\n       \"..                  ...     ...  \\n\",\n       \"197                 NaN     NaN  \\n\",\n       \"198                 NaN     1.0  \\n\",\n       \"199                 NaN     NaN  \\n\",\n       \"200                 NaN     1.0  \\n\",\n       \"201                 NaN     NaN  \\n\",\n       \"\\n\",\n       \"[202 rows x 7 columns]\"\n      ]\n     },\n     \"execution_count\": 7,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"youtube_caption.lines\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/html\": [\n       \"\u003cdiv\u003e\\n\",\n       \"\u003cstyle scoped\u003e\\n\",\n       \"    .dataframe tbody tr th:only-of-type {\\n\",\n       \"        vertical-align: middle;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe tbody tr th {\\n\",\n       \"        vertical-align: top;\\n\",\n       \"    }\\n\",\n       \"\\n\",\n       \"    .dataframe thead th {\\n\",\n       \"        text-align: right;\\n\",\n       \"    }\\n\",\n       \"\u003c/style\u003e\\n\",\n       \"\u003ctable border=\\\"1\\\" class=\\\"dataframe\\\"\u003e\\n\",\n       \"  \u003cthead\u003e\\n\",\n       \"    \u003ctr style=\\\"text-align: right;\\\"\u003e\\n\",\n       \"      \u003cth\u003e\u003c/th\u003e\\n\",\n       \"      \u003cth\u003etext\u003c/th\u003e\\n\",\n       \"      \u003cth\u003easr_confidence\u003c/th\u003e\\n\",\n       \"      \u003cth\u003eoffset_ms\u003c/th\u003e\\n\",\n       \"      \u003cth\u003epen_id\u003c/th\u003e\\n\",\n       \"      \u003cth\u003estart_time_ms\u003c/th\u003e\\n\",\n       \"      \u003cth\u003eline_id\u003c/th\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"  \u003c/thead\u003e\\n\",\n       \"  \u003ctbody\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e0\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eis\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e2820\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e1\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003ethere\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e599.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e3419\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e2\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003ecool\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e839.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e3659\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e3\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003esmall\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1020.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e3840\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e4\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eprojects\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1380.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e4200\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e...\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e...\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e763\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003esounds\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1260.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216120\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e199\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e764\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003ekind\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e240.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1320.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216180\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e199\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e765\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003eof\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e1500.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216360\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e199\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e766\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003e\\\\n\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216470\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e200\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"    \u003ctr\u003e\\n\",\n       \"      \u003cth\u003e767\u003c/th\u003e\\n\",\n       \"      \u003ctd\u003ecrazy\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e248.0\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNaN\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003eNone\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e216480\u003c/td\u003e\\n\",\n       \"      \u003ctd\u003e201\u003c/td\u003e\\n\",\n       \"    \u003c/tr\u003e\\n\",\n       \"  \u003c/tbody\u003e\\n\",\n       \"\u003c/table\u003e\\n\",\n       \"\u003cp\u003e768 rows × 6 columns\u003c/p\u003e\\n\",\n       \"\u003c/div\u003e\"\n      ],\n      \"text/plain\": [\n       \"          text  asr_confidence  offset_ms pen_id  start_time_ms  line_id\\n\",\n       \"0           is           248.0        NaN   None           2820        1\\n\",\n       \"1        there           248.0      599.0   None           3419        1\\n\",\n       \"2         cool           248.0      839.0   None           3659        1\\n\",\n       \"3        small           248.0     1020.0   None           3840        1\\n\",\n       \"4     projects           248.0     1380.0   None           4200        1\\n\",\n       \"..         ...             ...        ...    ...            ...      ...\\n\",\n       \"763     sounds           248.0     1260.0   None         216120      199\\n\",\n       \"764       kind           240.0     1320.0   None         216180      199\\n\",\n       \"765         of           248.0     1500.0   None         216360      199\\n\",\n       \"766         \\\\n             NaN        NaN   None         216470      200\\n\",\n       \"767      crazy           248.0        NaN   None         216480      201\\n\",\n       \"\\n\",\n       \"[768 rows x 6 columns]\"\n      ]\n     },\n     \"execution_count\": 8,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    }\n   ],\n   \"source\": [\n    \"youtube_caption.segments\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"is there cool small projects like uh\\n\",\n      \"archive sanity and and so on that you're\\n\",\n      \"thinking about the the the\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(youtube_caption.get_text(start_time_ms=0, end_time_ms=10000))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"venv\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.9\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurfdlr%2Fyt-cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurfdlr%2Fyt-cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurfdlr%2Fyt-cc/lists"}