Skip to content

romka777/rutube_uploader_selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Python script to upload videos on RuTube using Selenium. Based on https://github.com/linouk23/youtube_uploader_selenium

Package Installation

pip3 install --upgrade rutube-uploader-selenium

Script Installation

git clone https://github.com/romka777/rutube_uploader_selenium
cd rutube-uploader-selenium

Package Usage

from youtube_uploader_selenium import YouTubeUploader

video_path = '123/rockets.flv'
metadata_path = '123/rockets_metadata.json'

uploader = YouTubeUploader(video_path, metadata_path, thumbnail_path)
was_video_uploaded, video_id = uploader.upload()
assert was_video_uploaded

Script Usage

At a minimum, just specify a video:

python3 upload.py --video rockets.flv

If it is the first time you've run the script, a browser window should popup and prompt you to provide YouTube credentials (and then simply press Enter after a successful login). A token will be created and stored in a file in the local directory for subsequent use.

Video title, description and other metadata can specified via a JSON file using the --meta flag:

python3 upload.py --video rockets.flv --meta metadata.json

An example JSON file would be:

{
  "title": "Best Of James Harden | 2019-20 NBA Season",
  "description": "Check out the best of James Harden's 2019-20 season so far!",
  "genre": "Videogames",
  "adult": 0
}

Dependencies

FAQ

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages