Giter Site home page Giter Site logo

offish / opplast Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 19.0 61 KB

Upload videos to YouTube using geckodriver, Firefox profiles and Selenium.

License: MIT License

Python 100.00%
youtube youtube-upload youtube-uploader selenium selenium-webdriver selenium-python youtube-video youtube-channel geckodriver upload-videos

opplast's Introduction

offish

hobbyist programmer on a stack no cap

'

'
1JMTVxReTE9nyXorzPPReLpWXXrRkSybaZ


offish 2020

opplast's People

Contributors

breuerfelix avatar lentilstew avatar markdrrr avatar offish avatar powaful3000 avatar r-yeates avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opplast's Issues

show upload progress

status_container.text.find(UPLOADED)

With this we can get the progress text and output it on the command line。

Unable to locate element

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

Error uploading video

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

entrance

How does the login process work?

Hi

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

Unable to find clips for specific streamers

The script cannot find clips from a certain streamer despite other streamers working fine

image
image

the config file is completely stock except for length which is 10 minutes and timeframe which is set to 0 (all time)

Error: any ideas?

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]

Add Customize executable_path

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() ?

unable to locate element

It cant upload and states the following
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //input[@type='file']

Unable to locate element

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

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //input[@type='file']

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.