Manage youtube videos from command line

Hi,

I have a heap of videos, say it’s a set of videos.
The set is updated regularly, say a dozen videos in a month.
Videos not on youtube, have to be uploaded.
Sometimes videos needs to be deleted from the channel.

I want this to automate, so I just put video file in a directory, and a regularly ran script uploads them to youtube - after that it returns the video link.
I could figure out how to do this using a fork of youtube-upload Forks · tokland/youtube-upload · GitHub.

But how would I delete a video from Youtube, assuming I know (and own) the ID?

Do you know something capable to do this?

Thanks in advance.

I think Youtube is a sink.

I’m afraid I don’t understand this :thinking:

When you pour something down a sink, it is near impossible to get it back
Sorry sink is a term used in R programs … usually an output log.

1 Like

Oh I see, thanks.
Whenever the deletion occurs, I don’t want it to back. :slight_smile:

OK wrong term . In R a sink is a logfile. You cant delete stuff from a logfile.
I am afraid once you give google something it is not able to be deleted.

1 Like

I’m not sure if Google keeps the thing for data mining purposes or not. But I can surely delete a video from my channel, via browser, so there must be a way.
I’m investigating shoogle GitHub - davesteele/shoogle: Use the Google API from the shell
The examples I found are about uploading videos, but Videos: delete  |  YouTube Data API  |  Google for Developers
mentions the magic word “delete”.
So I’m looking at this now…
I don’t know how I’ll do this, but I’m sure I’ll be able achieve the scripted video remove, and once when it works from cli / script I’ll be able to automate it.
So my problem is not solved yet, but seems, I’m on a track…

Thanks for thinking together :wink:

I get what you mean now.
Apparently it is easily done with some google gui , but from the command line you need to work out how to drive that API. The specs are obscure to say the least.
and
it doesnt really delete it if it has been archived

1 Like

I don’t care. The goal is to make the video vanish for other users, e.g. Youtube should show message “Video removed” or similar.

I expect a lot of tinkering, yes.
I’m still fighting with oauth… :smiley:

1 Like

@kovacslt ,
In more general terms, is it possible to reverse-engineer a gui into a set of command line statements?
I know of no app that could do that, but it should be achievable.

1 Like

No need for that now. The shoogle does what I want, yuppie!!! :smiley:
The hard part was to figure out, I need to create a “project” on googles API manager, after that create an “app”, and for that app create Oauth credentials, download json, and use that with shoogle as client-secret.
That took my yesterday afternoon and evening.
So I have now the basic Lego bricks to build my intended functionality. :slight_smile:
I’ll repeat only the necessary steps to confirm, that those are necessary, as I had a whole lot of trial and error.
I’ll be back with those steps later :wink:

2 Likes