Havoc Brother Song Tamil Latest -

results = [] for item in data.get("items", []): video_id = item["id"]["videoId"] snippet = item["snippet"] results.append( "video_id": video_id, "title": snippet["title"], "channel": snippet["channelTitle"], "thumb": snippet["thumbnails"]["medium"]["url"], "published": snippet["publishedAt"] ) return results

# ---------------------------------------------------------------------- # CONFIG – put your YouTube API key in an environment variable for safety # ---------------------------------------------------------------------- YOUTUBE_API_KEY = os.getenv("YT_API_KEY") YOUTUBE_SEARCH_URL = "https://www.googleapis.com/youtube/v3/search" havoc brother song tamil latest

if __name__ == "__main__": # For development only – use a proper WSGI server in prod. app.run(debug=True, host="0.0.0.0", port=5000) <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Havoc Brother – Tamil Latest</title> <style> body font-family: Arial, sans-serif; margin: 2rem; #results margin-top: 1.5rem; .video-card display:flex; margin-bottom:1rem; cursor:pointer; .video-card img width:120px; height:auto; margin-right:1rem; .video-card div flex:1; .video-card:hover background:#f5f5f5; #player margin-top:2rem; </style> </head> <body> <h1>Search: “havoc brother song tamil latest”</h1> results = [] for item in data

<div id="player"></div>

@app.route("/search", methods=["GET"]) def search(): q = request.args.get("q", "") if not q: return jsonify("error": "missing query"), 400 try: videos = youtube_search(q) return jsonify("videos": videos) except Exception as exc: return jsonify("error": str(exc)), 500 Havoc Brother – Tamil Latest&lt

<script> // Auto‑run the query on page load const query = "havoc brother song tamil latest";

fetch(`/search?q=$encodeURIComponent(query)`) .then(r => r.json()) .then(data => if (data.error) document.getElementById('results').innerText = "Error: " + data.error; return; const container = document.getElementById('results'); data.videos.forEach(v => const card = document.createElement('div'); card.className = 'video-card'; card.innerHTML = ` <img src="$v.thumb" alt="thumb"> <div> <strong>$v.title</strong><br> <small>Channel: $v.channel<br> Published: $new Date(v.published).toLocaleDateString()</small> </div>`; card.onclick = () => loadVideo(v.video_id); container.appendChild(card); ); ) .catch(err => document.getElementById('results').innerText = "Fetch error: " + err; );