Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
X

XVideos-PornHub-RedTube-API

> 开发工具
Open source

This script scrapes the HTML from different web pages to get the information from the video (XVideos, PornHub, RedTube) and you can use it in your own video pla

172 stars0 likes3 views
WebsiteGitHub

About

This script scrapes the HTML from different web pages to get the information from the video (XVideos, PornHub, RedTube) and you can use it in your own video pla

XVideos PornHub RedTube API

This script scrapes the HTML from different web pages to get the information from the video and you can use it in your own video player.

Features

  • Get video sources (MP4, HLS)
  • Get thumbnail (poster)
  • Get thumbnails for preview (VTT)
  • Add new sites / servers
  • Data caching

Installation

Copy the dir to the root of a web server running PHP 7.

Usage

Only get requests are accepted, so data can be entered directly in url

Parameter Description
site_id id of the site that wants to get the video (xvideos, pornhub, redtube)
video_id id of the video that corresponds to the site
data link to the video, with at least the domain name and video id

Example

php
 It's recommended that the sites have different IP addresses.

In case of adding your own site, add folder [api-for-own-servers](api-for-own-servers) anywhere on your site so that data can be extracted from it.

### Categorize sites

To avoid making dozens of requests and waiting for them all to complete, sites are categorized by loading speed, the first ones will be the fastest (1s, 2s), and the next ones will be slower (3s, 4s, 5s).

#### How it work

The data is extracted from all the sites in the first category, and if all the data is obtained, no more data is extracted, otherwise, it will continue with the next category until all the data is obtained.

### Caution

By default there's a list of sites to obtain data but as they're from third parties there is a risk that they may stop working, so it's recommended that you add your own sites / servers.

Issues· 7 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPcrawlerphppornhubpornhub-api

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具