Bulk import YouTube channels videos into PeerTube channels and playlists
Go to file
2021-07-02 17:06:49 +02:00
src Initial version of you2peer found functionnal with SigmaTube 2021-07-02 17:06:49 +02:00
.gitignore Initial version of you2peer found functionnal with SigmaTube 2021-07-02 17:06:49 +02:00
config.json.sample Initial version of you2peer found functionnal with SigmaTube 2021-07-02 17:06:49 +02:00
LICENSE Initial commit 2021-06-12 11:49:18 +00:00
README.md Initial version of you2peer found functionnal with SigmaTube 2021-07-02 17:06:49 +02:00

you2peer

Python script that mirrors YouTube Channels or playlist on a PeerTube instance

Requirements

  • youtube-dl (both on machine running this script, and on peertube host)
  • python3 requests
  • cURL (to retrieve credentials first time)

Usage

Copy config file sample

cp config.json.sample config.json

Get PeerTube config: (Populate config.json with json response values..)

# Get client tokens
curl https://peertube.example.com/api/v1/oauth-clients/local

# Get user token
curl -X POST \
 -d "client_id=zip6rwzni6hplvtw3dp9t02hnkfugpzu&client_secret=AjWiOapPltI6EnsWQwlFarRtLh4u8tDt&grant_type=password&response_type=code&username=your_user&password=your_password" \
  https://peertube.example.com/api/v1/users/token

First create target channels and playlists (using an admin account) and then Get channels id, and playlists id using api in navigator (to be added in config.json):

Contributors

  • Samuel ORTION

Others are welcome !

License

  • GNU GPL v3 or later (see LICENSE)