import urllib.request
import json

req = urllib.request.Request("https://api.github.com/repos/BtbN/FFmpeg-Builds/releases", headers={"User-Agent": "Mozilla/5.0"})
try:
    with urllib.request.urlopen(req) as resp:
        data = json.loads(resp.read().decode())
    urls = []
    for r in data:
        tag = r.get("tag_name", "")
        for a in r.get("assets", []):
            url = a.get("browser_download_url", "")
            if "linux64-gpl" in url and "shared" not in url:
                urls.append((tag, url))
    for tag, u in urls[:10]:
        print(tag, u)
except Exception as e:
    print("Error:", e)
