fawazahmed0 / youtube-uploader

Free youtube video uploader with no limits
MIT License
349 stars 84 forks source link

Upload is stuck #159

Closed Icaro1447 closed 2 years ago

Icaro1447 commented 2 years ago

First of all the video is uploaded as a draft, and it get stuck while processing it for some reason. And I think it's because youtube asks me to check the COPPA (if it's made for kids or not). I changed a bit of the default script and also added the option to choose if it's gonna keep it draw or not, but it didn't seem to work. Please tell me if I'm doing something wrong/dumb or if I am dumb by myself. Here is the script:

const { upload } = require('youtube-videos-uploader');

const credentials = { email: '*', pass: '*', recoveryemail: '*' }

const onVideoUploadSuccess = (videoUrl : any) => {
    // ..do something..
}

const video1 = { path: 'C:\\Users\\BlykS\\Desktop\\test\\video.mp4', title: 'video', language: 'english', channelName: 'my secondary channels name', keepDraw: 'false', onSuccess:onVideoUploadSuccess, skipProcessingWait: true, onProgress: (progress : any) => { console.log('progress', progress) } }

upload (credentials, [video1]).then(console.log)

And here is what happens in my terminal:

C:\Users\BlykS\Desktop\test>npx ts-node uploader.ts
progress { progress: 0, stage: 0 }
progress { progress: 3, stage: 0 }
progress { progress: 7, stage: 0 }
progress { progress: 10, stage: 0 }
progress { progress: 14, stage: 0 }
progress { progress: 17, stage: 0 }
progress { progress: 20, stage: 0 }
progress { progress: 24, stage: 0 }
progress { progress: 27, stage: 0 }
progress { progress: 30, stage: 0 }
progress { progress: 34, stage: 0 }
progress { progress: 37, stage: 0 }
progress { progress: 41, stage: 0 }
progress { progress: 44, stage: 0 }
progress { progress: 47, stage: 0 }
progress { progress: 51, stage: 0 }
progress { progress: 54, stage: 0 }
progress { progress: 57, stage: 0 }
progress { progress: 61, stage: 0 }
progress { progress: 64, stage: 0 }
progress { progress: 71, stage: 0 }
progress { progress: 78, stage: 0 }
progress { progress: 81, stage: 0 }
progress { progress: 84, stage: 0 }
progress { progress: 88, stage: 0 }
progress { progress: 95, stage: 0 }
progress { progress: 100, stage: 0 }
progress { progress: 51, stage: 0 }
progress { progress: 78, stage: 0 }
progress { progress: 87, stage: 0 }
progress { progress: 95, stage: 0 }
progress { progress: 0, stage: 0 }
progress { progress: 1, stage: 0 }
progress { progress: 2, stage: 0 }
progress { progress: 3, stage: 0 }
progress { progress: 4, stage: 0 }
progress { progress: 5, stage: 0 }
github-actions[bot] commented 2 years ago

Paid support is available for quick resolution, new features etc. For paid support, please write mail to youtube-uploader@datascraping.pp.ua

DominicFindlay commented 2 years ago

Yeah, the skipProcessingWait doesn't seem to do anything atm. It waits until the processing is done.

It may be best to set your whole channel for kids or not so it doesn't cause a issue here.

What do you mean by keepDraw?

Icaro1447 commented 2 years ago

Yeah, the skipProcessingWait doesn't seem to do anything atm. It waits until the processing is done.

It may be best to set your whole channel for kids or not so it doesn't cause a issue here.

Ok I'll try that.

What do you mean by keepDraw?

I was searching through the issues to fix my problem with youtube always processing the video as draft and I thought readme was outdated but It's not.

Icaro1447 commented 2 years ago

It may be best to set your whole channel for kids or not so it doesn't cause a issue here.

Ok after trying that and waiting the process, I got another error:

progress { progress: 100, stage: 2 }
C:\Users\BlykS\node_modules\youtube-videos-uploader\dist\upload.js:5
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
                                                         ^
TypeError: Cannot read properties of undefined (reading 'substring')
    at C:\Users\BlykS\node_modules\youtube-videos-uploader\src\upload.ts:218:41
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\BlykS\node_modules\youtube-videos-uploader\dist\upload.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

But after checking what was causing the problem one more time, I realized that youtube stuck on the upload due to the copyright claim check and idk how to pass this without clicking then Next button myself and posting it. image

salman0ansari commented 2 years ago

found any fix? seems like project is ded

pierreminiggio commented 2 years ago

seems like project is ded

Stop saying BS, last commit on this project is 5 days ago, you know ? If it's not fixed yet, it simply means that no one who cares enough about continuing the upload despite a copyright claim has placed an MR yet to fix it.

You can do it yourself whenever you think there is something on this package that needs change, especially if you're using it. Just like I did for a few features here ;)

On a side note : Why would you need to upload copyrighted videos on Youtube ?

pierreminiggio commented 2 years ago

@Icaro1447 You could update your issue's title to speecify that it's for copyrighted claimed videos.

Icaro1447 commented 2 years ago

@Icaro1447 You could update your issue's title to speecify that it's for copyrighted claimed videos.

Well, I discovered that it doesn't matter if the video has copyright or not. The tool simply won't upload anything. It saves everything as draft and I dont know what to do anymore.

DominicFindlay commented 2 years ago

This sometimes happens to me, when the videos is left as a draft.

It used to happen eveeytime if I had another video uploading (separately)

But it happens somewhat randomly still.

I don't have any copyright issues with my videos.

pierreminiggio commented 2 years ago

Well, I discovered that it doesn't matter if the video has copyright or not. The tool simply won't upload anything. It saves everything as draft and I dont know what to do anymore.

Did you make sure to do all the steps described in the readme file ?

Usually when a video is stuck as a draft, it's likely because it's missing a default upload value for a field.

Icaro1447 commented 2 years ago

@Icaro1447 You could update your issue's title to speecify that it's for copyrighted claimed videos.

Well, I discovered that it doesn't matter if the video has copyright or not. The tool simply won't upload anything. It saves everything as draft and I dont know what to do anymore.

Have tried with another tool using a random video and happened again, and tried on a different channel as well, no idea whats causing it

Icaro1447 commented 2 years ago

Well, I discovered that it doesn't matter if the video has copyright or not. The tool simply won't upload anything. It saves everything as draft and I dont know what to do anymore.

Did you make sure to do all the steps described in the readme file ?

Usually when a video is stuck as a draft, it's likely because it's missing a default upload value for a field.

Ok I rewrote the code but now more simple and it actually worked wtf.

progress { progress: 0, stage: 0 }
progress { progress: 3, stage: 0 }
progress { progress: 7, stage: 0 }
progress { progress: 10, stage: 0 }
progress { progress: 14, stage: 0 }
progress { progress: 20, stage: 0 }
progress { progress: 24, stage: 0 }
progress { progress: 30, stage: 0 }
progress { progress: 34, stage: 0 }
progress { progress: 41, stage: 0 }
progress { progress: 44, stage: 0 }
progress { progress: 51, stage: 0 }
progress { progress: 54, stage: 0 }
progress { progress: 57, stage: 0 }
progress { progress: 64, stage: 0 }
progress { progress: 68, stage: 0 }
progress { progress: 74, stage: 0 }
progress { progress: 78, stage: 0 }
progress { progress: 84, stage: 0 }
progress { progress: 88, stage: 0 }
progress { progress: 95, stage: 0 }
progress { progress: 98, stage: 0 }
progress { progress: 100, stage: 0 }
progress { progress: 0, stage: 1 }
progress { progress: 100, stage: 2 }
[ 'https://youtu.be/2tpX3fk9bRo' ]

And the video is also public, finally worked. Therefore I probably forgot to add a default upload value for a field, as said by @pierreminiggio

pierreminiggio commented 2 years ago

Feel free to post the MR then so we can all benefit from this :P