Spaces:
Paused
Paused
GilangAlRusliadi commited on
Commit ·
4925567
1
Parent(s): 139b9e5
Iwara
Browse files
iwara.py
CHANGED
|
@@ -355,5 +355,21 @@ if __name__ == '__main__':
|
|
| 355 |
|
| 356 |
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 357 |
|
| 358 |
-
def iwara():
|
| 359 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
|
| 356 |
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 357 |
|
| 358 |
+
def iwara(video_url, judul):
|
| 359 |
+
# Set the path to the thumbnail directory
|
| 360 |
+
directory = "/home/user/app/Iwara"
|
| 361 |
+
if not os.path.exists(directory):
|
| 362 |
+
os.makedirs(directory)
|
| 363 |
+
|
| 364 |
+
thumbnail_url = 'https://pbs.twimg.com/media/F3ViUpraUAAqtof?format=jpg&name=medium'
|
| 365 |
+
|
| 366 |
+
thumbnail_file = download_file(thumbnail_url, judul, directory)
|
| 367 |
+
video_file = download_file(video_url, judul, directory)
|
| 368 |
+
|
| 369 |
+
# Mengkonversi video
|
| 370 |
+
video_file = convert_videos(720, video_file)
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
video_info = f"Judul: {judul}\n"
|
| 374 |
+
|
| 375 |
+
return video_file, judul, video_info, thumbnail_file
|