randydev commited on
Commit
22d2f04
·
verified ·
1 Parent(s): b449f33

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -10
main.py CHANGED
@@ -175,16 +175,16 @@ async def youtube_video(payload: YouTubeBase):
175
  with open(f"{yt_file}.mp4", "rb") as video_file:
176
  encoded_string = base64.b64encode(video_file.read())
177
  return SuccessResponse(
178
- status="True",
179
- randydev={
180
- "video_data": encoded_string,
181
- "title": yt_data['title'],
182
- "views": yt_data['view_count'],
183
- "duration": secs_to_mins(int(yt_data['duration'])),
184
- "thumbnail": f"https://i.ytimg.com/vi/{yt_data['id']}/hqdefault.jpg",
185
- "time_second": time_second
186
- }
187
- )
188
  except Exception as e:
189
  return SuccessResponse(
190
  status="False",
 
175
  with open(f"{yt_file}.mp4", "rb") as video_file:
176
  encoded_string = base64.b64encode(video_file.read())
177
  return SuccessResponse(
178
+ status="True",
179
+ randydev={
180
+ "video_data": encoded_string,
181
+ "title": yt_data['title'],
182
+ "views": yt_data['view_count'],
183
+ "duration": secs_to_mins(int(yt_data['duration'])),
184
+ "thumbnail": f"https://i.ytimg.com/vi/{yt_data['id']}/hqdefault.jpg",
185
+ "time_second": time_second
186
+ }
187
+ )
188
  except Exception as e:
189
  return SuccessResponse(
190
  status="False",