diff options
Diffstat (limited to 'tools/processor.php')
-rw-r--r-- | tools/processor.php | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/tools/processor.php b/tools/processor.php index 85b4ff0..c3afdd1 100644 --- a/tools/processor.php +++ b/tools/processor.php @@ -15,17 +15,18 @@ $baselink = htmlspecialchars( $_GET['link'] ); $urlexists = url_exists( $baselink ); if ( $urlexists === TRUE ) { // Regex - filter URL id is match[5] - $rx = '/^((?:https?:)?\/\/)? # Optional protocol - ((?:www|m)[.])? # Optional sub-domain + $rx = '/^((?:https?:)?\/\/)? # Optional protocol + ((?:www|m)[.])? # Optional sub-domain ((?:youtube[.]com| youtu[.]be| invidio[.]us| invidiou[.]sh| invidious[.]kabi[.]tk| invidious[.]glie[.]town| - invidious[.]snopyta[.]org)) # URL supports - (\/(?:[\w\-]+\?v=|embed\/|v\/)?) # Parameters (embed, v) - ([\w\-]+) # Video id of 11 + yotter[.]conocimientoslibres[.]ga| + invidious[.]snopyta[.]org)) # URL supports + (\/(?:[\w\-]+\?v=|embed\/|v\/)?) # Parameters (embed, v) + ([\w\-]+) # Video id of 11 (\S+)?$/mx'; preg_match( $rx, $baselink, $match ); @@ -78,9 +79,16 @@ $streamFormats = $video_info->formatStreams; // Downloads $downloads = $video_info->formatStreams; +// Live +$islive = $video_info->liveNow; + ///// Beaking DRM!!! // Check standar video into URL -$url_standar = video_exists( $streamFormats[0]->url ); +if ( $islive === FALSE ) { + $url_standar = $streamFormats[0]->url; +} else { + $url_standar = FALSE; +} if ( $url_standar === FALSE ) { // nodes @@ -93,9 +101,6 @@ if ( $url_standar === FALSE ) { $node0on = video_exists( $node0 ); $node1on = video_exists( $node1 ); - // format video DRM - $formatdrm = $streamFormats[0]->type; - // check nodes if ( $node0on === TRUE ) { $breakurl = $node0; @@ -106,12 +111,22 @@ if ( $url_standar === FALSE ) { $formatdrm = 'video/webm'; } - // liberty data - $breakquality = trim( $streamFormats[0]->resolution, 'p' ); + // format video DRM + if ( $islive === FALSE ) { + $formatdrm = $streamFormats[0]->type; + $breakquality = trim( $streamFormats[0]->resolution, 'p' ); + $downloadQuality = $streamFormats[0]->resolution; + $downloadFormat = $downloads[0]->container; + } else { + $formatdrm = NULL; + $breakquality = NULL; + $downloadQuality = NULL; + $downloadFormat = NULL; + } + $breaklink = TRUE; - $downloadFormat = $downloads[0]->container; - $downloadQuality = $streamFormats[0]->resolution; $downloadbreak = TRUE; + } else { // clean variables $breakurl = NULL; |