Open GabrielSerealia opened 3 years ago
It appears commenting out the close method on line 247 resolves this. My guess is it's searching for a selector that does not exist anymore? There's also a large delay in between publishing videos of a few seconds, but it doesn't matter that much since I can run it in the background.
Just change line 247 from: await dialog.close(); to this: //await dialog.close();
Love the script by the way, I appreciate you making it in the first place.
Just some other little quirks with the script:
It looks like this happens as a result of setting videos as Private. If you publish a video as private, a small pop up appears at the bottom informing you that only you will be able to see the video, which looks like it breaks the script. This isn't an issue if you publish videos as unlisted. I do see that you managed to solve it by commenting out that line however. Another workaround could be to use the script to mass publish them as unlisted (to remove the draft bit), then use youtube studio's checklist option to make them all private again.
When I try to run the JS in the console it will proceed to publish one video then timeout at the draft video list. After the timeout it throws this error.
VM15930:69 Uncaught (in promise) TypeError: Cannot read property 'querySelector' of null at waitForElement (:69:34)
at SuccessDialog.closeDialogButton (:117:26)
at SuccessDialog.close (:121:30)
at Object.publishDrafts [as publish_drafts] (:247:26)
If I find a solution I'll post it here.
I'm running Google Chrome on Windows.
Only things I've changed: const VISIBILITY = 'Private'; // 'Public' / 'Private' / 'Unlisted'