mirror of
https://github.com/ReviveMii/revivetube
synced 2025-04-29 12:39:25 -04:00
fix
This commit is contained in:
parent
c75017a8a5
commit
0661d46b99
1 changed files with 1 additions and 3 deletions
|
@ -239,18 +239,16 @@ def watch():
|
||||||
if channel_response.status_code == 200:
|
if channel_response.status_code == 200:
|
||||||
channel_data = channel_response.json()
|
channel_data = channel_response.json()
|
||||||
|
|
||||||
# Abonnentenanzahl extrahieren
|
|
||||||
for stat in channel_data.get("statistics", []):
|
for stat in channel_data.get("statistics", []):
|
||||||
for count in stat.get("counts", []):
|
for count in stat.get("counts", []):
|
||||||
if count.get("value") == "subscribers":
|
if count.get("value") == "subscribers":
|
||||||
subscriber_count = count.get("count", "Unbekannt")
|
subscriber_count = count.get("count", "Unbekannt")
|
||||||
break
|
break
|
||||||
|
|
||||||
# Profilbild (PFP) extrahieren
|
|
||||||
for stat in channel_data.get("statistics", []):
|
for stat in channel_data.get("statistics", []):
|
||||||
for user_info in stat.get("user", []):
|
for user_info in stat.get("user", []):
|
||||||
if user_info.get("value") == "pfp":
|
if user_info.get("value") == "pfp":
|
||||||
channel_logo_url = user_info.get("count", "")
|
channel_logo_url = user_info.get("count", "").replace("https://", "http://")
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"SuperPlayCounts API Error: {str(e)}")
|
print(f"SuperPlayCounts API Error: {str(e)}")
|
||||||
|
|
Loading…
Add table
Reference in a new issue