This Python script uses the youtube-dl
command-line tool to download YouTube videos, audio, and lyrics from Anime Music Videos (AMVs) to conduct further multimodal sentiment analysis.
- Python 3.6 or above.
- youtube-dl
-
Install
youtube-dl
using pip:pip install youtube-dl
-
Run the script providing the link to the video as an argument:
python amvdownloader.py [YouTube URL]
Replace
[YouTube URL]
with the URL of the video that you want to download.
Here is the main command used by this script:
os.system(f"youtube-dl -a {link} -x --audio-format mp3 -i --id")
This command does the following:
-a {link}
: Downloads the video at the URL specified by{link}
.-x
: Extracts audio from the video (converts the video to audio).--audio-format mp3
: Specifies that the audio format should be MP3.-i
: Continues on download errors.--id
: Uses the video ID as the filename.
Remember, it's your responsibility to respect YouTube's Terms of Service. Make sure that you have the appropriate permissions to download and use the content.
This project is licensed under the MIT License - see the LICENSE file for details.