Skip to main content

opplast

Version License Stars Issues Size Discord Code style

Donate Steam Donate PayPal

Upload videos to YouTube using geckodriver, Firefox profiles and Selenium. Easy to setup and use. Repository is inspired by youtube_uploader_selenium.

"Opplast" is norwegian for "upload".

Installing

Install and update using pip:

pip install opplast

Download geckodriver and place it inside C:\Users\USERNAME\AppData\Local\Programs\Python\Python37. If you are using another version of Python, you place it inside there.

Configuration

Open Firefox, and go to about:profiles. Click "Create a New profile" and name it "Selenium" or whatever. Copy the "Root Directory" path of the new profile. This is your root_profile_directory. Now you can "Launch profile in new browser", go to YouTube, and login to the account you want to upload with.

Upload(root_profile_directory: str, timeout=TIMEOUT, headless=True, debug=True) -> None

timeout: int - seconds Selenium should wait, when getting pages and inserting data. Default: 3.

headless: bool - whether or not you want to see the GUI. Default: True.

headless: bool - whether or not you want to see the debug info. Default: True.

Usage

from opplast import Upload


upload = Upload(
    "C:/Users/USERNAME/AppData/Roaming/Mozilla/Firefox/Profiles/random.selenium",
    timeout=3,
    headless=True,
    debug=True,
)

was_uploaded, video_id = upload.upload(
    {
        "file": "path/to/video.mp4",
        "title": "My YouTube Title",
        "description": "My YouTube Description",
    }
)

if was_uploaded:
    print(f"{video_id} has been uploaded to YouTube")

upload.close()

License

MIT License

Copyright (c) 2021 offish

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for opplast 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opplast 1.0.0
File Size Uploaded
opplast-1.0.0.tar.gz 4.9 kB Details

Release files / opplast-1.0.0.tar.gz

Download URL opplast-1.0.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
143944cb74d4048c25e50e1806a5eef65818537ea0ff5553d6ccd0e83e022f99
BLAKE2b-256 checksum
How to use checksums
2483578f1ebe63e6e314239754bf2dfed3630fb07de5f0abd0d0777d3a028627
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Release history Release notifications | RSS feed

1.0.14

1 release file

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page