From 61069a9f46ce0179fc361cce45c7c6c1b2720802 Mon Sep 17 00:00:00 2001 From: Anjali-Shridhar-Shetty Date: Wed, 9 Jul 2025 18:53:30 +0530 Subject: [PATCH 1/3] pytubefix instead of pytube --- Download Audio/Download Audio.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Download Audio/Download Audio.py b/Download Audio/Download Audio.py index 16826717..d332af09 100644 --- a/Download Audio/Download Audio.py +++ b/Download Audio/Download Audio.py @@ -1,6 +1,8 @@ import os -import pytube -from moviepy.editor import * +import pytubefix as pytube +from moviepy import * +#from moviepy.editor import * + # Define the YouTube video URL youtube_url = "https://www.youtube.com/watch?v=E6eKvji_BoE" @@ -14,10 +16,10 @@ # Convert the audio stream to an MP3 file using MoviePy audio_clip = AudioFileClip(temp_file) -mp3_file = os.path.join("Give Your own path", "Name.mp3") +mp3_file = os.path.join("/home/anjali/", "test.mp3") audio_clip.write_audiofile(mp3_file) # Clean up the temporary file os.remove(temp_file) -print("Audio extracted and saved as MP3 file to", mp3_file) \ No newline at end of file +print("Audio extracted and saved as MP3 file to", mp3_file) From e3720b97b7d1f2f7308f3a1e089ecb9a6ca82371 Mon Sep 17 00:00:00 2001 From: Anjali-Shridhar-Shetty Date: Wed, 9 Jul 2025 19:37:23 +0530 Subject: [PATCH 2/3] pytubefix instead of pytube --- Download Audio/Download Audio.py | 2 +- Download Audio/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Download Audio/Download Audio.py b/Download Audio/Download Audio.py index d332af09..200aab70 100644 --- a/Download Audio/Download Audio.py +++ b/Download Audio/Download Audio.py @@ -16,7 +16,7 @@ # Convert the audio stream to an MP3 file using MoviePy audio_clip = AudioFileClip(temp_file) -mp3_file = os.path.join("/home/anjali/", "test.mp3") +mp3_file = os.path.join("Give Your own path", "Name.mp3") audio_clip.write_audiofile(mp3_file) # Clean up the temporary file diff --git a/Download Audio/README.md b/Download Audio/README.md index 7f4a56b8..b38d10e7 100644 --- a/Download Audio/README.md +++ b/Download Audio/README.md @@ -21,7 +21,7 @@ This is a python script that downloads audio files directly from youtube videos. This script is written in Python language. So make sure you have python installed in your computer. Two modules of python are used in this script to install those follow below steps 1. Open cmd prompt 2. write "pip install moviepy" -3. write "pip install pytube" +3. write "pip install pytubefix ## 🌟 How to run - Open the Download Audio.py script From c29319288d4965af04eb4bf5bd87585d48ad3c3a Mon Sep 17 00:00:00 2001 From: Anjali-Shridhar-Shetty Date: Wed, 9 Jul 2025 19:54:07 +0530 Subject: [PATCH 3/3] Fix #323: pytubefix instead of pytube --- Download Audio/Download Audio.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Download Audio/Download Audio.py b/Download Audio/Download Audio.py index 200aab70..3d00876b 100644 --- a/Download Audio/Download Audio.py +++ b/Download Audio/Download Audio.py @@ -1,8 +1,6 @@ import os import pytubefix as pytube from moviepy import * -#from moviepy.editor import * - # Define the YouTube video URL youtube_url = "https://www.youtube.com/watch?v=E6eKvji_BoE"