loostie/yummy-dl

此包最新版本(v1.0.1)没有可用的许可信息。

提供了一种简单的方法来获取成人网站上的视频数据

v1.0.1 2023-02-21 14:50 UTC

This package is auto-updated.

Last update: 2024-09-21 18:25:47 UTC


README

YummyDL 提供了一种简单的方法来获取成人网站上的视频数据

安装

获取 YummyDL 的最佳方式是使用 composer 下载

composer require loostie/yummy-dl

使用方法

为了保持简单,所有网站都将返回相同的对象,其外观如下

{
    ["found"] => bool,
    ["vidLink"] => string,
    ["thumbnail"] => string,
    ["title"] => string,
    ["tags"] => array

}

如果由于某种原因无法检索视频数据,上述所有内容都将为 false

示例

<?php
require 'vendor/autoload.php'; // Composer's autoloader

use Loostie\YummyDL\RedTube;       // For RedTube
use Loostie\YummyDL\SpankBang;     // For SpankBang
use Loostie\YummyDL\Xnxx;          // For Xnxx
use Loostie\YummyDL\Xvideos;       // For Xvideos

// In this example we use Xvideos, but the procedure is the same for all of them
$video = new Xvideos();
$video->setUrl("https://xvideos.com/your_preferred_video");
$video_data = $video->getVideoData();

// This is just an example where we var_dump the response
// Then check if video data was found
var_dump($video_data);
if ($video_data->found) {
    echo $video_data->title     // The title of the video
    echo $video_data->thumbnail // Link to the video thumbnail (you could use this in <img src>)
    echo $video_data->vidLink   // Direct link to the video (not on the site), where it can be downloaded
    foreach ($video_data->tags as $tag) {
        echo $tag               // All tags for the video
    }
}

支持网站(NSFW 链接)