WebSaver

Active Member
30
2024
2
1,030
Hello Wjunction members,

I want to know, how to stream anime using video hosting's API. As I am using video hosings [filegram.to, safestream.cc etc.] to store my anime video files manually and Now I want to stream the Anime in my website. The video hosting are providing the iframe embeds to stream but I don't want to do it manually as It will take months to embed all of them.
So is there anyone who can help me by telling how to use API to stream.
It will be helpful.

Thank You.
Post automatically merged:

If anyone don't know so tell me if it is possible or not!!
 
Last edited:
11 comments
Everything is possible, what you need is a script wich you will use to upload video to various sites, using their apis, then you grt iframe urls and post them to yout site, but then you site must have api.
 
Everything is possible, what you need is a script wich you will use to upload video to various sites, using their apis, then you grt iframe urls and post them to yout site, but then you site must have api.
Ok I am now understanding a little bit.....
Sorry for taking your time, But I have the little confusion. So can you please help me resolve it.
"Suppose I have video hosting available as I said above and I am uploading the Anime/Movies in it manually from my PC & I don't want to use API to upload anime.
Ok after uploading, now I have Iframe embed URL of the Anime which I can paste in my website to play the anime.
But the issue is it is taking so much time to get and paste every episode's Iframe embed URL to play it.
So I just wanted to know if I can use the API just to paste the Iframe URLs like the DATA ID or I have to do it manually forever."
Thank You./
Post automatically merged:

Ok I am now understanding a little bit.....
Sorry for taking your time, But I have the little confusion. So can you please help me resolve it.
"Suppose I have video hosting available as I said above and I am uploading the Anime/Movies in it manually from my PC & I don't want to use API to upload anime.
Ok after uploading, now I have Iframe embed URL of the Anime which I can paste in my website to play the anime.
But the issue is it is taking so much time to get and paste every episode's Iframe embed URL to play it.
So I just wanted to know if I can use the API just to paste the Iframe URLs like the DATA ID or I have to do it manually forever."
Thank You./
I mean, I want the API just to stream the Anime not for uploading and other stuffs....
 
Last edited:
Hello Wjunction members,

I want to know, how to stream anime using video hosting's API. As I am using video hosings [filegram.to, safestream.cc etc.] to store my anime video files manually and Now I want to stream the Anime in my website. The video hosting are providing the iframe embeds to stream but I don't want to do it manually as It will take months to embed all of them.
So is there anyone who can help me by telling how to use API to stream.
It will be helpful.

Thank You.
Post automatically merged:

If anyone don't know so tell me if it is possible or not!!

Manages Embed API Links​

username : admin
Password : Embedze
 
Well if you using wordpress you can, since wordpress have rest api.
Sorry for consuming your time...
but If you get any free time then please help me out as I don't know how to use REST api to stream my anime because I am not that much pro in coding. I only know HTML, CSS, medium level of JS, and a very little bit of PHP. So if you got the time, help me out. It will be helpful. Thank You.

[ If anyone is reading this thread and has a free time can help me out. It would be very helpful ]
 
Last edited:
You chose safestream and filegram two of the most shadiest sites. I'm almost certain both are operated by same admin as streamsb
No-No! I just gave the example of the video hostings. I am not using them as the primary source. I mentioned these because all of the video hosting has the similar API.
My question is how to use API to stream.!
Post automatically merged:

Ok so Now....... I have integrated the API key in my wordpress website's function.php code. [ I am not using any plugin to do this ]

I use this code :-

function fetch_data_from_api() {
$api_key = 'my_api_key';
$response = wp_remote_get('https://api.example.com/data', array(
'headers' => array(
'Authorization' => 'Bearer ' . $api_key,
),
));

if (is_wp_error($response)) {
return;
}

$body = wp_remote_retrieve_body($response);
return json_decode($body);
}

Now can anyone tell me what to do next to get URL of anime directly for streaming anime.???
Post automatically merged:

Below is the link of API Documentation of the video hosting's. Tell me anyone, how to use that.

 
Last edited:
Authorization header aint required since you will put key in url for example thta endpoint url will get you info for specified video.
and by
get URL of anime directly for streaming anime. you want to get m3u8/mp4 direct link so you can play it in your own player?? that aint possible, some hosting sites have that option but only if you buy premium.
Oh!! Now I understood. I have to be the premium user to get the anime video's mp4/m3u8 direct links to play them if the video hosting has this feature.
So basically now it seems like as a free user there is no options to stream the anime using API.
All I have to embed the Iframe URLs manually in the website to play the anime. Is the correct na??

Thank You for your Reply.
It's time to add the iframes manually.........!!!!!
Post automatically merged:

[ ONLY one last Question I am asking so please REPLY (anyone) ....It will help me ]

I inspected the HTML code of 9animetv.to website's streaming page & I got these codes.

(1.) HTML code of the SERVERS -

<div class="ps__-list">

<div class="item server-item" data-type="sub" data-id="1107706" data-server-id="4">
<a href="javascript:;" class="btn active">Vidstreaming</a>
</div>

<div class="item server-item" data-type="sub" data-id="1107704" data-server-id="1">
<a href="javascript:;" class="btn">Vidcloud</a>
</div>

</div>


(2.) JAVA Script code used in it -

<script>
$('.server-item').click(function () {
$('.server-item .btn').removeClass('active');
$(this).find('.btn').addClass('active');
const id = $(this).data('id');
getSources(id);
localStorage.setItem('currentSource', $(this).data('type'));
localStorage.setItem(keyLsCurrentServer, $(this).data('server-id'));
});

function getSources(id) {
$('#source-guide').empty();
$.get('/ajax/episode/sources?id=' + id, function (res) {
if (res.htmlGuide) {
$('#content-guide').removeClass('only-one');
$('#source-guide').html(res.htmlGuide);
}
if (res.link !== "") {
var linkIframe = res.link;
if ([1, 4].indexOf(parseInt(res.server)) >= 0) {
linkIframe += "&autoPlay=" + userSettings.auto_play + "&oa=" + (userSettings.play_original_audio || 0)
}
$('#iframe-embed').attr('src', linkIframe);
$('#iframe-embed').show();
}
})
}
</script>

[ My questions are below ] -

(1.)
What are they using API or DATABASE to get the URLs to stream the Anime?
[This is the main question as I want to know where are they storing the links, in database or using API to fetch URL]

(2.) Why Data Id are used [ data-id="1107706" , data-id="1107704" ] ?
*(for all the episodes data id's are different)*

(3.) What are they using to stream mp4/m3u8 links or Iframe embeds?

(4.) Can I make this too to stream Anime in my website?

(5.) Why only one Iframe code is showing when the server is playing, Is another server's Iframe not loading till user click the button to change the server..?


Thank You.
Post automatically merged:

[ Basically the whole question is how 9animetv.to buttons-servers are working!! How are the buttons getting URL to stream Anime. ]
Post automatically merged:

Hello There!! Any updates by anyone??
 
Last edited:
Hey! If you wish to automate the process, review the API documentation offered by the video hosting services you're utilizing. Typically, you'll need to connect using their API before using endpoints to programmatically extract video URLs and embed codes. For example, you can utilize their API to retrieve a list of your videos as well as direct streaming URLs, which you can then dynamically integrate into your website's player. To speed things up, check to see if the APIs provide batch processing or bulk retrieval. If you require specific code samples or encounter problems, the API documentation and support forums for each service should provide more extensive instructions.
 
Step 1: Choose a Video Hosting Provider
First, select a video hosting provider that offers an API. Some popular options are:

YouTube API
Vimeo API
Dailymotion API
Wistia API
Step 2: Create an Account and Get API Keys
Sign Up: Register for an account on the chosen video hosting platform.
Create a Project: Often, you need to create a project/application within the provider’s developer portal.
Obtain API Keys: After creating the project, you'll receive API keys or authentication tokens needed for API calls.
Step 3: Familiarize Yourself with the API Documentation
Refer to the official documentation for the API you are using to understand the available endpoints, request formats, authentication requirements, rate limits, and response structures.

Step 4: Set Up Your Development Environment
Programming Language: Pick a programming language to use (Python, JavaScript, Ruby, etc.)
HTTP Client: Install an HTTP client (like requests for Python or axios for JavaScript) to make API calls.
Step 5: Authenticate with the API
Authentication methods may vary by provider, but most use OAuth 2.0 or API keys. Example (using Python requests):

CopyReplit
import requests

API_KEY = 'YOUR_API_KEY'

# Example API Request
url = 'https://api.video-hosting.com/videos'
headers = {
'Authorization': f'Bearer {API_KEY}',
}
response = requests.get(url, headers=headers)
Step 6: Upload a Video
Check the API documentation for the endpoint used to upload videos. Here’s a generic example:

CopyReplit
video_file = {'file': open('path/to/video.mp4', 'rb')}
response = requests.post('https://api.video-hosting.com/upload', headers=headers, files=video_file)
print(response.json())
Step 7: Manage Video Metadata
Once the video is uploaded, you may need to set metadata (like title, description, tags) using the appropriate endpoints:

CopyReplit
video_id = 'uploaded_video_id'
metadata = {
'title': 'My Video Title',
'description': 'This is a description of my video.',
}

response = requests.put(f'https://api.video-hosting.com/videos/{video_id}', headers=headers, json=metadata)
print(response.json())
Step 8: Retrieve Analytics and Video Data
To extract analytics or video data, use the corresponding GET endpoints:

CopyReplit
response = requests.get(f'https://api.video-hosting.com/videos/{video_id}/analytics', headers=headers)
analytics_data = response.json()
print(analytics_data)
Step 9: Handle Errors and Rate Limiting
Make sure to handle errors (like 4xx and 5xx status codes) gracefully and implement backoff strategies for rate limits.

Step 10: Integrate and Test
Once you've implemented the necessary API calls, test them thoroughly. Ensure that video uploads, updates, and data retrieval are working as intended.

Resources
API Documentation: Always refer to the provider's official API documentation for specific details about endpoints, request/response structures, and limitations.
SDKs or Libraries: Some providers offer SDKs that can simplify interaction with their APIs.
 
Back
Top