import urllib.request import json import sys sys.stdout.reconfigure(encoding='utf-8') coll = "DrIsrarAhmedTafseerOfQuranEnglishFullQuranAustralianIslamicLibrary" url = f"https://archive.org/metadata/{coll}/files" req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'}) try: with urllib.request.urlopen(req) as r: data = json.loads(r.read()) mp3s = [f['name'] for f in data.get('result', []) if f['name'].endswith('.mp3')] print(f"=== {coll} ===") print(f"Total MP3s: {len(mp3s)}") for f in mp3s[:10]: print(" ", f) if len(mp3s) > 10: print(" ...") for f in mp3s[-5:]: print(" ", f) except Exception as e: print("Error:", e)