Peertube: Channel import script does not work on YT channels having playlists

Created on 11 Dec 2020  路  3Comments  路  Source: Chocobozzz/PeerTube

Describe the current behavior
Trying to use CLI to import a full channel from YouTube.
It's finding the channel, downloading all videos.
But, when trying to upload to PeerTube, it returns the current error:

Uploading on PeerTube video "".
.field(name, val) val can not be empty

From what I understand, it looks like the variable videoAttributes is empty.

Note that the script works properly when importing only one video.

Also, note that before downloading all videos, the script displays the following text:

info: Will download and upload 7 videos.

info: ############################################################

info: Downloading video "undefined"...
info: [youtube:tab] PLFePO0Dghdic0nEGhzJ4rEq8ZdbCZny43: Downloading webpage
[download] Downloading playlist: Revue de presse
[youtube:tab] playlist Revue de presse: Downloading 35 videos
[download] Downloading video 1 of 35
[youtube] S0OyeBOI_r0: Downloading webpage
[download] /home/optisseur/peertube-cli/dist/server/tools/be4f66e0bdcd97773ad6a76e2e23ab518c46412e79fa33ff20130018fdd1a7c1.mp4 has already been downloaded and merged
[download] Downloading video 2 of 35
...

Steps to reproduce:

  1. Install CLI as recommanded in PeerTube docs
  2. Use following command : peertube import -u "instance" -U "user" -p "pwd" --target-url "https://www.youtube.com/c/LeCanardR%C3%A9fractaire"

Describe the expected behavior
I expect all videos to be properly uploaded. Also, I expect the script to don't reupload already uploaded videos.

Additional information

  • PeerTube instance:
CLI Type

Most helpful comment

All 3 comments

I tried with a different channel and everything is working fine.

I noticed the message [download] /home/optisseur/peertube-cli/dist/server/tools/be4f66e0bdcd97773ad6a76e2e23ab518c46412e79fa33ff20130018fdd1a7c1.mp4 has already been downloaded and merged when trying to import the bugged channel.

Any clue about where it comes from?

Edit: I tried a third and it's bugging too. I will try to find out why some work and others don't.

Okay. I found out where the bug comes from:

Any YouTube channel having playlists will have this issue.
Any YouTube channel without playlists works find.

The script seems to consider playslists as video. As an exemple, if you try to use --last 2 parameter, the script will still consider importing all videos from playlists and not only the last two videos uploaded.

I tried with those channels (those without playlists have been found randomly):

Those who does not work (and have playlist)

Those who work (and haven't any playlist)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tcitworld picture tcitworld  路  3Comments

milleniumbug picture milleniumbug  路  3Comments

zilti picture zilti  路  3Comments

conferences-gesticulees picture conferences-gesticulees  路  3Comments

filmaidykai picture filmaidykai  路  3Comments