youtube_uploader_selenium
youtube_uploader_selenium copied to clipboard
Video description replaces title when uploading, and video is marked as for kids
During the upload, after the program inputs the title into the text box it deletes the title and inputs the description. The upload also says that you (the program) has marked it as for kids.
I had some kind of crash around the Marked for kids section.
What I did was comment that part of the code out parts.
#kids_section = self.browser.find(
#By.NAME, NOT_MADE_FOR_KIDS_LABEL)
#self.browser.find(By.ID, RADIO_LABEL, kids_section).click()#
#self.logger.debug('Selected \"{}\"'.format(
#NOT_MADE_FOR_KIDS_LABEL))
time.sleep(1)
Then it had stuff about adding tags that I didn't need. I commented that out
# # Advanced options
# self.browser.find(By.XPATH, MORE_BUTTON).click()
# self.logger.debug('Clicked MORE OPTIONS')
# tags_container = self.browser.find(By.XPATH,
# TAGS_INPUT_CONTAINER)
# tags_field = self.browser.find(
# By.ID, TAGS_INPUT, element=tags_container)
# self.__write_in_field(tags_field, ','.join(
# self.metadata_dict[VIDEO_TAGS]))
# self.logger.debug(
# 'The tags were set to \"{}\"'.format(self.metadata_dict[VIDEO_TAGS]))
And if you program isn't doing the basics just uploading the thing then I suggest commenting those out.
Then go to the settings for your channel and set the whole channel to not for kids or, if you want, for kids.. So that option won't appear every time a file is uploaded.
I got some slightly different behaviour to you re the title. I don't pass the program any metadata for title/description. . I saw youtube put in a title by default and the program replacing that with whatever(in my case replacing it with the same thing). But if you see code that you think "deletes the title", then just comment that out!!
Use the web browser element inspector to find the ID of what you want to click on and code that. His code clicks next multiple times. I commented that out. And customised it for what I want. e.g. I just wanted the video uploaded(which his program does), and visibility set to private and done.