mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 19:45:24 +00:00
api: Fix error parsing sc site
This commit is contained in:
parent
060a96e657
commit
89deb6c283
@ -64,8 +64,15 @@ def title_search(title_search: str) -> int:
|
|||||||
# Prepara le scelte per l'utente
|
# Prepara le scelte per l'utente
|
||||||
if site_constant.TELEGRAM_BOT:
|
if site_constant.TELEGRAM_BOT:
|
||||||
choices = []
|
choices = []
|
||||||
|
|
||||||
for i, dict_title in enumerate(response.json()['data']):
|
# Collect json data
|
||||||
|
try:
|
||||||
|
data = response.json().get('data', [])
|
||||||
|
except Exception as e:
|
||||||
|
console.log(f"Error parsing JSON response: {e}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
for i, dict_title in enumerate(data):
|
||||||
try:
|
try:
|
||||||
media_search_manager.add_media({
|
media_search_manager.add_media({
|
||||||
'id': dict_title.get('id'),
|
'id': dict_title.get('id'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user