Forum in maintenance, we will back soon
Youtube Summarization
I am unable to summarize youtube now, don't know what the error please help.
Here also getting same error in the
token limit as well.
in the helpers file, update the function to:
def get_video_transcript(video_url): match = re.search(r"(?:youtube\.com\/watch\?v=|youtu\.be\/)(.*)", video_url) if match: VIDEO_ID = match.group(1) else: raise ValueError("Invalid YouTube URL") video_id = VIDEO_ID # Fetch the transcript using the YouTubeTranscriptApi transcript = YouTubeTranscriptApi.get_transcript(video_id) # Extract the text of the transcript transcript_text = "" for line in transcript: transcript_text += line["text"] + " " return transcript_text
sir then this error pops up
from youtube_transcript_api import YouTubeTranscriptApi
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@ssadvisor @admin guys, it is still not working for me, I followed both of you please can you look into it? I only provided my zip please can you check and tell me fast. https://drive.google.com/file/d/1FjJjDLZmQA-ZTS6GlNTjl5KwRs9I1gD6/view?usp=sharing. please help me.
Did you save the helpers the file, it is the same error, it looks like it didn't read the updated code.
Hi guys,
after setting up youtube_summarization.py , helpers.py and youtube_prompts.py the result from my OpenAI API is the text word by word from the youtube video.
But helpers.py file is giving me the next problem: "C:\Users\10_Pro\AppData\Local\Programs\Python\Python312\Lib\re\__init__.py" is overriding the stdlib module "re".
I tried to search online, I don't know how to resolve it.
@ionut-antal please provide a full screenshot of the problem.
Do you have a file named re.py in your application?
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@ionut-antal I suggest you use a virtual environment. Use
virtualenv VENV VENV/Scripts/activate
If you don't have virtualenv on your system then do
pip install virtualenv
After you've activated your virtual environment then you pip install your required modules. Also start the VS Code IDE after you've activated your virtual environment.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@ionut-antal you mean the script is working but the output is just the youtube transcript?
please share a screenshot of the script your are running
@ionut-antal did you try what I suggested?
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
@ionut-antal you are printing the video_script, and not the AI response. check the print statement