Remote upload to Dailymotion from Google drive
Go down 👇 for updates modified code
Screenshots of the updated modified code

Channel category you can choose 👇

Published option you can choose 👇

Dailymotion upload video from Google drive
Okay, here's how you can upload a video from Google Drive to Dailymotion using Python in Colab:
1. Install the Dailymotion API client:
!pip install dailymotion
Use code with caution
2. Authenticate with the Dailymotion API:
Create a Dailymotion developer account and register an application.
Obtain your API client ID and client secret from your application settings.
Use the following code to authenticate and obtain an access token:
from dailymotion import Dailymotion
d = Dailymotion()
d.set_grant_type('password', api_key='YOUR_CLIENT_ID', api_secret='YOUR_CLIENT_SECRET', scope=['manage_videos'])
url = d.get_authorization_url() # This might be slightly inaccurate, but try the following: Copy and paste the url in another tab to get your authorization code
authorization_code = input("Enter the authorization code from the URL: ") # paste the authorization code from the url that opens in another tab
access_token = d.get_access_token(authorization_code)
d.set_access_token(access_token)
Use code with caution
3. Mount Google Drive:
from google.colab import drive
drive.mount('/content/drive')
Use code with caution
4. Upload the video:
video_path = '/content/drive/MyDrive/your_video.mp4' # Replace with your video's path in Google Drive
# Specify upload parameters:
# https://developers.dailymotion.com/api/#Video-Parameters
video_data = {
'title': 'My Video Title',
'description': 'My Video Description',
'tags': 'tag1,tag2,tag3',
'channel': 'news', # Choose the appropriate channel
'published': 'true', # Set to 'false' to keep the video private
}
# Upload the video:
url = d.upload(video_path, video_data) # Returns the URL of the uploaded video.
# This might be slightly inaccurate, but try the following: print(url) and click on it to see if your video is uploaded correctly or run it in another cell to see the URL.
Use code with caution
Reasoning:
We install the dailymotion library to interact with the Dailymotion API.
We authenticate with the Dailymotion API using our client credentials and an authorization code to get an access token.
We mount Google Drive to access the video file.
We use the d.upload method to upload the video to Dailymotion with the specified parameters.
Download
If you have any questions
Comment Here
Or
YouTube
Username: @internationalsmedianetwork
Dailymotion
Username: internationalmedianetwork