diff options
author | Jesús <heckyel@hyperbola.info> | 2019-05-25 13:53:39 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-05-25 13:53:39 -0500 |
commit | dd6d9181ab43817ff9cefe4efbf3d666a4a1ec29 (patch) | |
tree | 888c2a332e05e6cdb5868b9c067692efda688241 /tools/processor.php | |
parent | 0f3f8814cad36f14d194bc3605c93b5f5c6cb073 (diff) | |
download | ytlibre-dd6d9181ab43817ff9cefe4efbf3d666a4a1ec29.tar.lz ytlibre-dd6d9181ab43817ff9cefe4efbf3d666a4a1ec29.tar.xz ytlibre-dd6d9181ab43817ff9cefe4efbf3d666a4a1ec29.zip |
added function video_exists
Diffstat (limited to 'tools/processor.php')
-rw-r--r-- | tools/processor.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/processor.php b/tools/processor.php index 22fa1fe..efcacdb 100644 --- a/tools/processor.php +++ b/tools/processor.php @@ -8,7 +8,7 @@ if (empty($_GET['link'])){ $baselink = htmlspecialchars($_GET['link']); $urlexists = url_exists( $baselink ); -if ($urlexists == true) { +if ($urlexists == TRUE) { // Regex - filter URL id is match[5] $rx = '/^((?:https?:)?\/\/)? # Optional protocol ((?:www|m)[.])? # Optional sub-domain @@ -60,8 +60,8 @@ $downloads = $video_info->formatStreams; /* Breaking DRM!!! */ -// check standar URL -$url_standar = url_exists($streamFormats[0]->url); +// Check standar video into URL +$url_standar = video_exists($streamFormats[0]->url); // format video DRM $formatdrm = $streamFormats[0]->type; @@ -71,20 +71,20 @@ $node1 = "https://invidious.snopyta.org/latest_version?id={$video_id}&itag=18&lo // explain DRM $drmv = "https://archive.org/download/libreweb/rms-drm.webm"; -// check nodes -$node0on = url_exists($node0); -$node1on = url_exists($node1); +$node0on = video_exists($node0); +$node1on = video_exists($node1); -if ($node0on == true) { +// check nodes +if ($node0on == TRUE) { $breakurl = $node0; -} elseif ($node1on == true) { +} elseif ($node1on == TRUE) { $breakurl = $node1; } else { $breakurl = $drmv; $formatdrm = 'video/webm'; } -if ($url_standar == false) { +if ($url_standar == FALSE) { // Liberty data $breakquality = trim($streamFormats[0]->resolution, 'p'); $breaklink = <<<EOT |