Shorts: baodantri+baosuckhoedoisong with duongdenworldcup_2026 fallback (guaranteed content)
Browse files
main.py
CHANGED
|
@@ -176,13 +176,16 @@ def _yt_channel_shorts(channel, count=15):
|
|
| 176 |
return videos
|
| 177 |
except:return[]
|
| 178 |
def scrape_shorts():
|
| 179 |
-
"""Fetch shorts from @baodantri7941 + @baosuckhoedoisongboyte
|
| 180 |
vids=[]
|
| 181 |
for ch in ["baodantri7941","baosuckhoedoisongboyte"]:
|
| 182 |
try:
|
| 183 |
r=_yt_channel_shorts(ch,12)
|
| 184 |
if r:vids.extend(r)
|
| 185 |
except:pass
|
|
|
|
|
|
|
|
|
|
| 186 |
vids.sort(key=lambda x:x.get("id",""),reverse=True)
|
| 187 |
return vids[:20]
|
| 188 |
|
|
|
|
| 176 |
return videos
|
| 177 |
except:return[]
|
| 178 |
def scrape_shorts():
|
| 179 |
+
"""Fetch shorts from @baodantri7941 + @baosuckhoedoisongboyte (fallback: duongdenworldcup_2026)"""
|
| 180 |
vids=[]
|
| 181 |
for ch in ["baodantri7941","baosuckhoedoisongboyte"]:
|
| 182 |
try:
|
| 183 |
r=_yt_channel_shorts(ch,12)
|
| 184 |
if r:vids.extend(r)
|
| 185 |
except:pass
|
| 186 |
+
if not vids:
|
| 187 |
+
try:vids=_yt_channel_shorts("duongdenworldcup_2026",20)
|
| 188 |
+
except:pass
|
| 189 |
vids.sort(key=lambda x:x.get("id",""),reverse=True)
|
| 190 |
return vids[:20]
|
| 191 |
|