Skip to content

Commit

Permalink
Create upload_multiple.py
Browse files Browse the repository at this point in the history
offish authored Mar 13, 2021
1 parent 5d66490 commit a86e09d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions examples/upload_multiple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from opplast import Upload


videos = [
{
"file": "path/to/video.mp4",
"title": "My First YouTube Title",
"description": "My First YouTube Description",
"thumbnail": "path/to/thumbnail.jpg",
"tags": ["these", "are", "my", "tags"],
},
{
"file": "path/to/video2.mp4",
"title": "My Second YouTube Title",
"description": "My Second YouTube Description",
"thumbnail": "path/to/thumbnail2.jpg",
"tags": ["these", "are", "my", "tags"],
},
]

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

for video in videos:
was_uploaded, video_id = upload.upload(video)

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

upload.close()

0 comments on commit a86e09d

Please sign in to comment.