We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78de4a6 commit 05e4229Copy full SHA for 05e4229
tests/test_mcp.py
@@ -25,14 +25,15 @@
25
26
# 新しい関数を定義
27
def patched_extract_captions_json(self, html: str, video_id: str) -> dict:
28
+ print(html)
29
+
30
splitted_html = html.split("var ytInitialPlayerResponse = ")
31
32
if len(splitted_html) <= 1:
33
if 'class="g-recaptcha"' in html:
34
raise IpBlocked(video_id)
35
36
json_string = splitted_html[1].split("</script>")[0].strip()
- print(json_string)
37
video_data = json.loads(
38
json_string.split('};var')[0] + '}' if '};var' in json_string else \
39
json_string.rstrip(";")
0 commit comments