0

im trying to use Openloads API in python, i can do a remote upload like this:

ol_url = driver.current_url
resp = ol.remote_upload(ol_url)
file_id = resp.get('id')

Now i have a file uploaded in Openload and his ID, and now i want to know the Link or the Embed of this remote uploaded file.

I have been searching info for a long time and nothing, someone can help me? Please

3 Answers 3

0

By using "Check Remote Upload Status":

https://api.openload.co/1/remotedl/status?login={login}&key={key}&limit={limit}&id={id}

The response will contain the URL link for your upload. Replace {id} with your file_id value.

For more information read the API documentation: https://openload.co/api

0

It's very simple task as you have the file ID. Look at this openload url structure:

embed url: https://openload.co/embed/72fA-_Lq8Ak3/

direct link: https://openload.co/f/72fA-_Lq8Ak3

The difference is very simple: use /embed/yourfileid for embed and /f/yourfileid for direct link.

just replace the file_id with your openload file id:

https://openload.co/embed/file_id/
https://openload.co/f/file_id/
0

To get the link or the embed code of a file uploaded using Openload's remote upload API, you can make use of Openload's getFileInfo API endpoint.

Here's how you can do it in Python using the requests library:

import requests

API_LOGIN = 'your_api_login'
API_KEY = 'your_api_key'
FILE_ID = 'your_file_id'

# Construct the API endpoint URL
url = f'https://api.openload.co/1/file/info?login={API_LOGIN}&key={API_KEY}&file={FILE_ID}'

# Send a GET request to the API endpoint
response = requests.get(url)

# Parse the response JSON to get the file URL and embed code
json_response = response.json()
file_url = json_response['result']['url']
embed_code = json_response['result']['embed']

The getFileInfo API endpoint returns a JSON response that contains the file URL and the embed code in the result object. We can parse the JSON response using the response.json() method and extract the URL and embed code from the result object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.