fix: skip sponsored first ad in fallback path too
Browse files
main.py
CHANGED
|
@@ -201,8 +201,8 @@ async def fetch_p2p() -> dict:
|
|
| 201 |
except (KeyError, ValueError, TypeError):
|
| 202 |
continue
|
| 203 |
|
| 204 |
-
# Fallback:
|
| 205 |
-
for item in ads:
|
| 206 |
adv = item.get("adv", {})
|
| 207 |
try:
|
| 208 |
if float(adv.get("surplusAmount", 0)) > 0:
|
|
|
|
| 201 |
except (KeyError, ValueError, TypeError):
|
| 202 |
continue
|
| 203 |
|
| 204 |
+
# Fallback: segundo anuncio con stock (saltamos el patrocinado)
|
| 205 |
+
for item in ads[1:]:
|
| 206 |
adv = item.get("adv", {})
|
| 207 |
try:
|
| 208 |
if float(adv.get("surplusAmount", 0)) > 0:
|