app file
Browse files- summarizer.py +3 -0
summarizer.py
CHANGED
@@ -80,6 +80,9 @@ def getSummary(link, lexrank_switch, rpunkt_switch):
|
|
80 |
|
81 |
print('getting transcript using link: ', link)
|
82 |
video_id = ts.get_id_from_link(link)
|
|
|
|
|
|
|
83 |
raw_transcript, type_transcript = ts.get_json_transcript(video_id,rpunkt_switch)
|
84 |
print('transcript type: ', type_transcript)
|
85 |
#timestamps = ts.get_timestamps(raw_transcript)
|
|
|
80 |
|
81 |
print('getting transcript using link: ', link)
|
82 |
video_id = ts.get_id_from_link(link)
|
83 |
+
if 'Error' in video_id:
|
84 |
+
return video_id
|
85 |
+
|
86 |
raw_transcript, type_transcript = ts.get_json_transcript(video_id,rpunkt_switch)
|
87 |
print('transcript type: ', type_transcript)
|
88 |
#timestamps = ts.get_timestamps(raw_transcript)
|