hobbyist programmer on a stack no cap
'
1JMTVxReTE9nyXorzPPReLpWXXrRkSybaZ
offish 2020
Upload videos to YouTube using geckodriver, Firefox profiles and Selenium.
License: MIT License
status_container.text.find(UPLOADED)
With this we can get the progress text and output it on the command line。
Hello, seems like it cannot find an element?
error: There was an error Message: Unable to locate element: /html/body/ytcp-uploads-dialog/tp-yt-paper-dialog/div/ytcp-animatable[1]/ytcp-video-metadata-editor/div/ytcp-video-metadata-editor-basics/div[2]/ytcp-social-suggestions-textbox/ytcp-form-input-container/div[1]/div[2]/ytcp-mention-input when trying to upload to YouTube
Thanks
Currently, every video uploaded is set to public.
Hello! Thanks for creating this!
I look to be getting this error when using Upload. It does upload the video, but doesn't publish
DEBUG: Trying to set "...." as description...
Error: Message: Unable to locate element: /html/body/ytcp-uploads-dialog/tp-yt-paper-dialog/div/ytcp-animatable[1]/ytcp-video-metadata-editor/div/ytcp-video-metadata-editor-basics/div[2]/ytcp-mention-textbox/ytcp-form-input-container/div[1]/div[2]/ytcp-mention-input
How does the login process work?
Im sorry i don't know what I did, i think I edited a file, I'm new to github, I wanted to add the option to put tags in videos but I think I edited for everyone, i don't know how this works
I get this error
selenium.common.exceptions.SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
How to add a thumbnail to a video?
Hey Thanks for doing this. Very cool and easy.
it was working fine until today. i did pull your latest release. getting this error today using your sample code with a valid file location. on Windows 10 and FF 86.0 (64-bit)
PS C:\Users\johnj> & python c:/Users/johnj/Desktop/auto-downloader/TestUpload03152021.py
DEBUG: Firefox is now running
DEBUG: Trying to upload "D:/ToYouTube/upload/365tour.mp4" to YouTube...
DEBUG: Trying to set "My YouTube Title" as title...
DEBUG: Trying to set "My YouTube Description" as description...
Traceback (most recent call last):
File "c:/Users/johnj/Desktop/auto-downloader/TestUpload03152021.py", line 8, in
was_uploaded, video_id = upload.upload(
File "C:\Users\johnj\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\opplast\upload.py", line 78, in upload
container = self.driver.find_element_by_xpath(DESCRIPTION_CONTAINER)
File "C:\Users\johnj\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line
394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\johnj\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line
976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\johnj\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line
321, in execute
self.error_handler.check_response(response)
File "C:\Users\johnj\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: /html/body/ytcp-uploads-dialog/tp-yt-paper-dialog/div/ytcp-animatable[1]/ytcp-uploads-details/div/ytcp-uploads-basics/ytcp-mention-textbox[2]
self.driver = webdriver.Firefox(firefox_profile=profile, options=options)
add more param executable_path
self.driver = webdriver.Firefox(firefox_profile=profile, options=options, executable_path='./geckodriver')
or use **kwargs to pass param when init webdrive.Firefox() ?
It cant upload and states the following
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //input[@type='file']
There was an error Message: Unable to locate element: /html/body/ytcp-uploads-dialog/tp-yt-paper-dialog/div/ytcp-animatable[1]/ytcp-ve/ytcp-video-metadata-editor/div/ytcp-video-metadata-editor-basics/div[2]/ytcp-social-suggestions-textbox/ytcp-form-input-container/div[1]/div[2]/div/ytcp-social-suggestion-input
when trying to upload to YouTube
I'm experiencing this error. That's my script
from opplast import Upload
if __name__ == "__main__":
upload = Upload(
# use r"" for paths, this will not give formatting errors e.g. "/n"
r"C:/Users/SpookyToad/AppData/Roaming/Mozilla/Firefox/Profiles/oysfbms4.selenium",
)
video_id = upload.upload(
r"E:\mc_video\video.mp4",
title="My YouTube Title",
description="My YouTube Description",
thumbnail=r"E:\mc_video\thumbnail.jpg",
tags=["these", "are", "my", "tags"],
)
#if was_uploaded:
# print(f"{video_id} has been uploaded to YouTube")
upload.close()
It says that error happens in script Upload at 80th line
self.driver.find_element_by_xpath(INPUT_FILE_VIDEO).send_keys(get_path(file))
sleep(self.timeout)
How i'm able to fix that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.