26 lines
925 B
Python
26 lines
925 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
|
|
# Load the cache file
|
|
with open('data/channel_cache.json', 'r', encoding='utf-8') as f:
|
|
cache = json.load(f)
|
|
|
|
print(f"📋 Channel cache type: {type(cache)}")
|
|
print(f"📋 Channel cache keys: {list(cache.keys())}")
|
|
|
|
# Check if it's a dictionary with channel URLs as keys
|
|
if isinstance(cache, dict):
|
|
print(f"\n🔍 First few cache entries:")
|
|
for i, (key, value) in enumerate(list(cache.items())[:3]):
|
|
print(f" {i+1}. Key: '{key}'")
|
|
print(f" Type: {type(value)}")
|
|
if isinstance(value, list):
|
|
print(f" Length: {len(value)} videos")
|
|
if value:
|
|
print(f" First video: {value[0]}")
|
|
print()
|
|
|
|
# Check if there's a "channels" key
|
|
if "channels" in cache:
|
|
print(f"🔍 Found 'channels' key with {len(cache['channels'])} entries")
|
|
print(f"🔍 Channels keys: {list(cache['channels'].keys())}") |