Remote upload to Dailymotion from url

Remote upload to Dailymotion from url

images
YouTube 

Dailymotion 

Screenshot for updates of modified code

For download this modified code go down 👇
All Fields available👇
Screenshot-20250323-053623
Channel category menu👇
Screenshot-20250323-053641

Publish menu 👇 
Screenshot-20250323-053648

Full details:

1. Install the Dailymotion API Client:

 !pip install dailymotion
Or
 !pip install dailymotion-sdk==0.2.0

2. Authenticate with Dailymotion:

You'll need to create a Dailymotion developer account and register an application to get your API credentials (client ID and client secret).
Then, use the following code for authentication:
 
from dailymotion import Dailymotion

d = Dailymotion()
d.set_grant_type(
    "password",
    api_key="YOUR_CLIENT_ID",
    api_secret="YOUR_CLIENT_SECRET",
    scope=["manage_videos"],
    info={"username": "YOUR_DAILYMOTION_USERNAME", "password": "YOUR_DAILYMOTION_PASSWORD"},
)

# This authenticates and gets an access token.
url = d.get_authorization_url()
print(url)
# Open this URL in your browser, authorize, and get the code from the URL
code = input("Enter the code from URL: ")
access_token = d.get_access_token(code)
d.set_access_token(access_token)
Use code with caution
Replace placeholders like YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, etc., with your actual credentials.

3. Upload the Video:

 
# Assuming your video file is named 'my_video.mp4' in Colab:
video_url = d.upload("my_video.mp4")
print(video_url) # This prints the URL of the uploaded video.
Use code with caution
Steps:

Install the Dailymotion API client using pip.
Replace placeholder values with your API credentials and Dailymotion account details.
Authenticate using password grant type and obtain an access token.
Upload the video using the upload method.
You'll get the video URL after a successful upload.
Important: Keep your API credentials secure and do not share them publicly.

            Download


If you have any issue 
Comment here or my YouTube channel or Dailymotion account 

YouTube 
 username: @internationalsmedianetwork

Dailymotion 
username: internationalmedianetwork


















International Media Network

Post a Comment

Previous Post Next Post