Rev 8 | Rev 11 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8 | Rev 10 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #!/usr/bin/php |
1 | #!/usr/bin/php |
2 | <?php |
2 | <?php |
3 | 3 | ||
4 | // ViaThinkSoft YouTube Downloader Util 2.2 |
4 | // ViaThinkSoft YouTube Downloader Util 2.2 |
5 | // Revision: 2021-07-15 |
5 | // Revision: 2022-02-05 |
6 | // Author: Daniel Marschall <www.daniel-marschall.de> |
6 | // Author: Daniel Marschall <www.daniel-marschall.de> |
7 | // Licensed under the terms of the Apache 2.0 License |
7 | // Licensed under the terms of the Apache 2.0 License |
8 | // |
8 | // |
9 | // For syntax and other documentation, please read the file README. |
9 | // For syntax and other documentation, please read the file README. |
10 | 10 | ||
Line 593... | Line 593... | ||
593 | $m = null; |
593 | $m = null; |
594 | if (preg_match("@https{0,1}://(www\\.|)youtube\\.com/user/(.*)(/|&|\\?)@ismU", $channel_url.'&', $m)) { |
594 | if (preg_match("@https{0,1}://(www\\.|)youtube\\.com/user/(.*)(/|&|\\?)@ismU", $channel_url.'&', $m)) { |
595 | $username = $m[2]; |
595 | $username = $m[2]; |
596 | $channel_id = yt_get_channel_id($username); |
596 | $channel_id = yt_get_channel_id($username); |
597 | return $channel_id; |
597 | return $channel_id; |
598 | } else if (preg_match("@https{0,1}://(www\\.|)youtube\\.com/channel/(.*)(/|&|\\?)@ismU", $channel_url.'&', $m)) { |
598 | } else if (preg_match("@https{0,1}://(www\\.|)youtube\\.com/(channel|c)/(.*)(/|&|\\?)@ismU", $channel_url.'&', $m)) { |
599 | $channel_id = $m[2]; |
599 | $channel_id = $m[3]; |
600 | return $channel_id; |
600 | return $channel_id; |
601 | } else { |
601 | } else { |
602 | return false; |
602 | return false; |
603 | } |
603 | } |
604 | } |
604 | } |