Quality Porn

FREEMIUM
Durch LBeckX | Aktualisiert 4 days ago | Video, Images
Popularität

9.3 / 10

Latenz

3,158ms

Service Level

100%

Health Check

100%

Zurück zu allen Diskussionen

Idea - Video download

Rapid account: L Beck X
LBeckX
a year ago

It’s always important to get new ideas. What are you missing from the API and what would you change?

Feel free to open a new thread with your idea!

Rapid account: L Beck X
LBeckX Commented a year ago

The problem is that you have to call each page, each link once. My API returns about 380 video links per request, which means you would have to make 380 requests afterwards. That probably takes a long time even if I cache the videos, since new videos are constantly being added.
But why do you need the player links of 380 videos at the same time. Surely any browser would crash?

Do you have your code on GitHub?
I assume that you have written your code in PHP. In my opinion PHP is not that good for asychrone requests. Therefore I would rather recommend NodeJS.

If you want to do it with PHP, I found something here:
https://www.geeksforgeeks.org/how-to-make-asynchronous-http-requests-in-php/

With this you could theoretically make 380 requests at the same time and that would be much faster than with synchronous requests.
Because you don’t have to wait for the answer of each request until you can start the next one.

Rapid account: Khkva 0 Au
khkva0au Commented a year ago

Hi,

I just saw your update.

Recently I found this :
https://github.com/Joel2B/XVideos-PornHub-RedTube-API

I’ve implemented this with your API.
So basically my Code gets a list of videos for a specific keyword from your API and then I’m fetching every link through the Scraper API (GitHub Link).

When I got the Link i just put it into a dedicated video player and serve it to the user.

That way I don’t download the videos locally but just get them from the site’s themself. But it takes a long time to load all videos (probably because of my slow code).

Altough I don’t know how your API is built but couldn’t you update your Database to add a cdn link attribute and create a script that goes through your Database and scrapes the Links via the GitHub API ?

I Thought of doing this and building my own API…

Rapid account: L Beck X
LBeckX Commented a year ago

Hi @khkva0au,
Locally I have managed to download PH videos. Unfortunately it is currently not possible to do this without the extension “ffmpeg”, which is unfortunately missing on my current server. This extension cannot be installed because the server is managed.
If you want, I can give you the code with which I was able to download the videos locally.
But I will keep the idea in the back of my mind.

Rapid account: L Beck X
LBeckX Commented a year ago

Yes exactly. I would continue the API approach and build a route to load the BLOB (datastream) from the video. This could then be used as an embedded link or even download the video directly.
PH and others currently have only a very annoying way to load your videos, which makes it not easy.
But I’ll give it a try.
After that I will probably connect this API via GeilHUB.
Have you already found an alternative?

Rapid account: Khkva 0 Au
khkva0au Commented a year ago

Hello LBeckX,

what do you mean by interface that requests videos directly ? like a Website you paste the link and it gets the cdn link?

I’ve sort of found two ways on how you could implement (CDN) links :

  1. Scrape the links with a python bot although that requires a lot of power and takes time (Think this was your Idea). And depends if the cdn link isn’t in the Database yet it could take some time but maybe after some using the links are in the Database and you only need to request the cdn links for new videos.

  2. I’ve found that some sites have an API more or less. For example the PornHub Network (tube8, pornhd etc) you can get a embeded link which is something. Also RedTube has an API although I think that you also don’t get the direct cdn links from them but again at least the embeded video links.

I keep looking for some options and maybe find something …

Rapid account: L Beck X
LBeckX Commented a year ago

@khkva0au

Thank you for your idea. I have thought about it. However, the delivery would be very slow without pre-crawling.
One idea would be to build an interface that requests the videos directly. Would that also be an option?

Rapid account: Khkva 0 Au
khkva0au Commented a year ago

Hello LBeckX,

have you thougt of also getting the direct video link from the cdn of each Site ?
would be a useful feature.

Best Regards,
khkva0au

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen