Git Product home page Git Product logo

youtubetakeouttoinvidious's Introduction

YoutubeTakeoutToInvidious

Easily import your Youtube playlists and subscriptions into Invidious. Takes CSV files from Youtube Takeout and converts them to Invidious JSON data.

How To Use

  • Get your data from Youtube using Google Takeout
  • Your playlists will be located in Takeout/YouTube and YouTube Music/playlists
  • Copy all these csv files for the playlist into the same folder as this script (or specify the folder with --csv-dir)
  • Get a base Invidious data json file
    • Make sure you have an account for Invidious on an instance.
    • From your Invidious instance, export your existing data (fine if you don't have any)
      • Found at Settings Gear Icon->Data Preferences->Import/Export Data->Export Invidious Data as json
  • Install the requirements (see below)
  • Run the script with python main.py
    • use --help to see how to change settings
  • Get the output json file from the out directory and import it into Invidious
    • Done at Settings Gear Icon->Data Preferences->Import/Export Data->Import Invidious JSON data
  • If you found this to be useful please star this repo

Install

You must have python installed.

System Wide Install

pip install -r requirements.txt

To then run with python main.py

pipenv install (for isolating package installs from your system Python env)

pipenv install

Then run with pipenv run python main.py

Limitations

  • Invidious limits playlist sizes. This script will split playlists with more than 490 videos into multiple playlists.
  • Invidious does not overwrite playlists when you import data. If you have existing playlists, you may need to delete duplicate playlists in your Invidious account after importing data.
    • However, if you have the same playlist name in both the Invidious json and the Youtube csv, the script will ask you if you want to append the videos in the Youtube csv playlist to the existing Invidious playlist, without adding another new playlist.

Help and Settings

 Usage: main.py [OPTIONS]

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --subs          --no-subs                Append subscriptions from subscriptions.csv [default: no-subs]                            │
│ --csv-dir                          TEXT  Directory where CSV files are read in from [default: .]                                   │
│ --append-all    --no-append-all          Automatically append to existing playlist without asking if the same name is in both the  │
│                                          Invidious json and Youtube csv                                                            │
│                                          [default: no-append-all]                                                                  │
│ --out-dir                          TEXT  Directory where json output is written to [default: out]                                  │
│ --invidious                        TEXT  Relative path to Invidious data file [default: subscription_manager.json]                 │
│ --split         --no-split               Split playlists with len>490 to accomodate for Invidious playlist size limit              │
│                                          [default: split]                                                                          │
│ --privacy                          TEXT  Privacy setting for playlists. Either Private or Public [default: Private]                │
│ --help                                   Show this message and exit.                                                               │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

youtubetakeouttoinvidious's People

Contributors

c-loftus avatar lyxhuston avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

firefly7-7

youtubetakeouttoinvidious's Issues

Missing Requirement & change to ln 137 main.py

Need to add rich to requirements.txt.

Also, to get this working with current Youtube Takeout playlist format, I had to make the following changes to main.py:

Ln 137 in main.py:
df = pandas.read_csv(f, skiprows=2)["Video Id"]
becomes:
df = pandas.read_csv(f)["Video ID"]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.