wldmr commited on
Commit
d0ccaa2
1 Parent(s): ee90b6b
Files changed (1) hide show
  1. transcript.py +4 -3
transcript.py CHANGED
@@ -12,12 +12,13 @@ def get_id_from_link(link):
12
 
13
  if "v=" in link:
14
  video_id = link.split("v=")[1].split("&")[0]
 
15
  elif len(link)==11:
 
16
  else:
17
- return "Error: Invalid Link, it does not have the pattern 'v=' in it."
18
-
19
- return video_id
20
 
 
21
  # step 1: download the json transcript for youtube video
22
  def get_json_transcript(video_id,rpunkt_switch):
23
 
 
12
 
13
  if "v=" in link:
14
  video_id = link.split("v=")[1].split("&")[0]
15
+ return video_id
16
  elif len(link)==11:
17
+ return video_id
18
  else:
19
+ return "Error: Invalid Link."
 
 
20
 
21
+
22
  # step 1: download the json transcript for youtube video
23
  def get_json_transcript(video_id,rpunkt_switch):
24