mirror of
https://github.com/ReviveMii/revivetube
synced 2024-12-29 06:10:44 +01:00
bug fix
This commit is contained in:
parent
cefd4ed7d6
commit
8869225760
@ -816,13 +816,14 @@ def channel_m():
|
|||||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
||||||
url = f"https://www.youtube.com/channel/{channel_id}/videos"
|
url = f"https://www.youtube.com/channel/{channel_id}/videos"
|
||||||
info = ydl.extract_info(url, download=False)
|
info = ydl.extract_info(url, download=False)
|
||||||
|
|
||||||
if 'entries' not in info:
|
if 'entries' not in info:
|
||||||
return "No videos found.", 404
|
return "No videos found.", 404
|
||||||
|
|
||||||
results = [
|
results = [
|
||||||
{
|
{
|
||||||
'id': video['id'],
|
'id': video['id'],
|
||||||
|
'duration': 'Duration not available on Channel View',
|
||||||
'title': video['title'],
|
'title': video['title'],
|
||||||
'uploader': info.get('uploader', 'Unknown'),
|
'uploader': info.get('uploader', 'Unknown'),
|
||||||
'thumbnail': f"http://yt.old.errexe.xyz/thumbnail/{video['id']}"
|
'thumbnail': f"http://yt.old.errexe.xyz/thumbnail/{video['id']}"
|
||||||
@ -836,4 +837,4 @@ def channel_m():
|
|||||||
return f"An error occurred: {str(e)}", 500
|
return f"An error occurred: {str(e)}", 500
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(host="0.0.0.0", debug=True, port=5000)
|
app.run(host="0.0.0.0", debug=True, port=5000)
|
||||||
|
Loading…
Reference in New Issue
Block a user