๐ŸšงThis is an Archive of LearnWithHasan. We updated our platformCheck Here
Skip to content

Forum in maintenance, we will back soon ๐Ÿ™‚

Youtube Summarizati...
 
Notifications
Clear all

Youtube Summarization

23 Posts
4 Users
6 Reactions
62 Views
(@kunal-lonhare)
Posts: 28
Eminent Member Customer
Topic starter
 

I am unable to summarize youtube now, don't know what the error please help.


 

 
Posted : 07/29/2023 12:41 pm
(@kunal-lonhare)
Posts: 28
Eminent Member Customer
Topic starter
 

Here also getting same error in the

token limit as well.

 

 
Posted : 07/29/2023 1:36 pm
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

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
 
 
Posted : 07/29/2023 3:53 pm
SSAdvisor reacted
(@kunal-lonhare)
Posts: 28
Eminent Member Customer
Topic starter
 

sir then this error pops up

 


 
Posted : 07/30/2023 1:42 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 
from youtube_transcript_api import YouTubeTranscriptApi

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 07/30/2023 7:35 pm
(@kunal-lonhare)
Posts: 28
Eminent Member Customer
Topic starter
 

@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.



 
Posted : 07/31/2023 7:08 am
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

Did you save the helpers the file, it is the same error, it looks like it didn't read the updated code.

 

 
Posted : 07/31/2023 1:08 pm
SSAdvisor reacted
(@ionut-antal)
Posts: 21
Eminent Member Customer
 

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.

This post was modified 12 months ago by Ionut Antal
 
Posted : 01/21/2024 1:48 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 01/21/2024 3:07 pm
(@ionut-antal)
Posts: 21
Eminent Member Customer
 

@ssadvisor

 I couldn't find any file named re.py in my pc.

Thanks for your time!

 

 
Posted : 01/21/2024 4:17 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 01/21/2024 6:20 pm
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

@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

 

 
Posted : 01/22/2024 6:05 am
(@ionut-antal)
Posts: 21
Eminent Member Customer
 

@admin


 
Posted : 01/22/2024 4:31 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 01/23/2024 1:26 am
Ionut Antal reacted
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

@ionut-antal you are printing the video_script, and not the AI response. check the print statement

 
Posted : 01/23/2024 8:05 am
Ionut Antal reacted
Page 1 / 2
Share:
[the_ad_group id="312"]