Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS Script does not process next draft #6

Open
GabrielSerealia opened this issue May 23, 2021 · 3 comments
Open

JS Script does not process next draft #6

GabrielSerealia opened this issue May 23, 2021 · 3 comments

Comments

@GabrielSerealia
Copy link

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'

@GabrielSerealia
Copy link
Author

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.

@GabrielSerealia
Copy link
Author

Just some other little quirks with the script:

  • It will attempt to publish processing videos (Just wait for it to finish processing all videos before running)
  • Debug spits out this line, not sure what it means "could not find ytcp-dialog.ytcp-video-share-dialog > tp-yt-paper-dialog:nth-child(1) inside VM17736:56"
  • And the debug also doesnt print the selected setting ""Made for kids" set as ${MADE_FOR_KIDS}"

@teatime-dev
Copy link
Contributor

teatime-dev commented Jun 6, 2021

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.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants