/**
* Zero-Quota Multi-Layer Live YouTube Search (Bypasses Cookie Walls & IP Blocks)
*/
public static function scrapeYoutubeLiveSearch($query, $maxResults = 20) {
$query = trim((string)$query);
if ($query === '') {
$query = 'top hits 2026';
}
$cacheFile = APPPATH . 'cache/yt_live_' . md5(strtolower($query) . '_' . $maxResults) . '.json';
if (file_exists($cacheFile) && (time() - @filemtime($cacheFile) < 21600)) {
$cached = json_decode((string)@file_get_contents($cacheFile), true);
if (is_array($cached) && count($cached) >= 3) {
return $cached;
}
}
$results = [];
$searchUrl = "https://www.youtube.com/results?search_query=" . urlencode($query) . "&hl=en&gl=US";
$ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
// Fetch HTML with CONSENT cookie to bypass YouTube's EU/Datacenter cookie wall
$html = '';
if (function_exists('curl_init')) {
$ch = curl_init($searchUrl);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_TIMEOUT => 8,
CURLOPT_USERAGENT => $ua,
CURLOPT_HTTPHEADER => [
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language: en-US,en;q=0.9",
"Cookie: CONSENT=YES+cb.20230531-07-p0.en+FX+999; PREF=hl=en&gl=US"
]
]);
$html = (string)curl_exec($ch);
curl_close($ch);
} else {
$html = (string)http_get_contents_safe($searchUrl, 8);
}
// Layer 1A: Parse ytInitialData JSON (supports both var ytInitialData and window["ytInitialData"])
if ($html !== '' && preg_match('/(?:var\s+ytInitialData|window\["ytInitialData"\])\s*=\s*(\{.+?\});\s*(?:<\/script>|if\s*\()/s', $html, $m)) {
$data = json_decode($m[1], true);
$sections = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents'] ?? [];
foreach ($sections as $sec) {
$items = $sec['itemSectionRenderer']['contents'] ?? [];
foreach ($items as $node) {
if (empty($node['videoRenderer'])) continue;
$v = $node['videoRenderer'];
$vid = $v['videoId'] ?? '';
if ($vid === '' || strlen($vid) !== 11) continue;
$title = $v['title']['runs'][0]['text'] ?? ($v['title']['accessibility']['accessibilityData']['label'] ?? 'Audio Track');
$uploader = $v['ownerText']['runs'][0]['text'] ?? ($v['longBylineText']['runs'][0]['text'] ?? 'Official Artist');
$duration = $v['lengthText']['simpleText'] ?? '3:45';
$results[] = [
'id' => $vid,
'judul' => html_entity_decode($title, ENT_QUOTES, 'UTF-8'),
'description' => html_entity_decode($title, ENT_QUOTES, 'UTF-8'),
'thumbnails' => "https://i.ytimg.com/vi/{$vid}/hqdefault.jpg",
'uploader' => html_entity_decode($uploader, ENT_QUOTES, 'UTF-8'),
'duration' => $duration,
'views' => getSongViewCount($vid, rand(2500, 85000))
];
if (count($results) >= $maxResults) break 2;
}
}
}
// Layer 1B: Direct Regex Fallback on raw HTML if YouTube altered the JSON wrapper
if (empty($results) && $html !== '') {
if (preg_match_all('/"videoRenderer":\{"videoId":"([a-zA-Z0-9_-]{11})".*?"title":\{"runs":\[\{"text":"([^"]+)"\}/s', $html, $matches, PREG_SET_ORDER)) {
$seen = [];
foreach ($matches as $match) {
$vid = $match[1];
if (isset($seen[$vid])) continue;
$seen[$vid] = true;
$cleanTitle = json_decode('"' . $match[2] . '"') ?: stripslashes($match[2]);
$results[] = [
'id' => $vid,
'judul' => html_entity_decode($cleanTitle, ENT_QUOTES, 'UTF-8'),
'description' => html_entity_decode($cleanTitle, ENT_QUOTES, 'UTF-8'),
'thumbnails' => "https://i.ytimg.com/vi/{$vid}/hqdefault.jpg",
'uploader' => ucwords($query),
'duration' => '3:45',
'views' => getSongViewCount($vid, rand(2500, 85000))
];
if (count($results) >= $maxResults) break;
}
}
}
// Layer 2: Public Piped YouTube API Mirror Fallback (if server IP is blocked by youtube.com)
if (empty($results)) {
$pipedApis = [
"https://pipedapi.kavin.rocks/search?q=" . urlencode($query) . "&filter=music_songs",
"https://pipedapi.tokhmi.xyz/search?q=" . urlencode($query) . "&filter=videos"
];
foreach ($pipedApis as $pUrl) {
$pRaw = http_get_contents_safe($pUrl, 6);
if (!$pRaw) continue;
$pJson = json_decode((string)$pRaw, true);
$pItems = $pJson['items'] ?? [];
foreach ($pItems as $pItem) {
if (preg_match('/v=([a-zA-Z0-9_-]{11})/', (string)($pItem['url'] ?? ''), $pm)) {
$vid = $pm[1];
$sec = (int)($pItem['duration'] ?? 225);
$durStr = ($sec > 0) ? sprintf('%d:%02d', floor($sec / 60), $sec % 60) : '3:45';
$results[] = [
'id' => $vid,
'judul' => $pItem['title'] ?? 'Audio Track',
'description' => $pItem['title'] ?? '',
'thumbnails' => "https://i.ytimg.com/vi/{$vid}/hqdefault.jpg",
'uploader' => $pItem['uploaderName'] ?? ucwords($query),
'duration' => $durStr,
'views' => getSongViewCount($vid, (int)($pItem['views'] ?? 12000))
];
if (count($results) >= $maxResults) break 2;
}
}
}
}
if (!empty($results)) {
@file_put_contents($cacheFile, json_encode($results), LOCK_EX);
}
return $results;
}
Download Lily Allen The Fear Clean Version MP3 (320kbps) | MP3juices
Home
»
Trending Hits
»
Lily Allen The Fear Clean Version
Download and stream Lily Allen The Fear Clean Version by Lily Allen in studio-quality 320kbps MP3 audio or MP4 HD video on MP3juices (mymuzplay.com) . Genre: Trending Hits • Duration: 3:47 • Views: 121 .
Track Specifications
Track Title: Lily Allen The Fear Clean Version
Artist: Lily Allen
Category: Trending Hits
Duration: 3:47
Bitrate: 320kbps Studio Quality MP3 / 720p HD MP4
DMCA Notice: All audio/video streams are indexed from YouTube.com and are not hosted on mymuzplay.com servers. To request removal, please see our Copyright & DMCA Policy .
Install MP3juices Browser App
Fast 1-tap access & saved music library on your home screen!
Install App
Home
Trending
Afrobeats
Amapiano