youtube-downloader / README.md
prasanth.thangavel
Update README.md with potential improvements
0313094
|
raw
history blame
1.99 kB
metadata
title: Youtube Downloader
emoji: 🦀
colorFrom: pink
colorTo: gray
sdk: gradio
sdk_version: 5.9.1
python_version: 3.11.5
app_file: app.py
pinned: false

YouTube Downloader

This application uses

  • yt_dlp - For downloading Audio/Video from YouTube and YoutTube Music.
  • HF gradio - For UI.

Cookies setup details

Note: This setup is only needed if running in hugging face (HF) spaces to avoid bot related errors.

  1. Download the YouTube Cookies
    • Follow the instruction provided here to download the YouTube cookies.
    • Rename the downloaded cookie as cookies.firefox-private.txt and place it in the current working directory
  2. Convert cookie file content to .env file
    • Simple copy paste will not work due to special characters
    • So, we will use the cookies_to_env function.
      • Uncomment the # Convert cookie file to env and save locally section and run the code
    • Remember to comment the code once the .env file is updated.
  3. Set up or Update the Secrets in HF
    • Copy the the .env content (only the value, and not the key) and paste it inside the Secrets (Private) > FIREFOX_COOKIES in Hugging Face space.
  4. Deploy the changes to HF space, and Voila!

.env file structure

FIREFOX_COOKIES="<Formatted_Cookie_Content_Goes_Here>"

Additional resources

  • Check out the configuration (and README metadata) reference here

Potential Improvements

  • Making the code async.
  • Add support for playlists.