Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 2.05 KB

README.md

File metadata and controls

64 lines (50 loc) · 2.05 KB

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