Spaces:
Paused
Paused
Commit ·
bdab4b9
1
Parent(s): 594ef79
add logging for options
Browse files- src/engine/generic.py +2 -1
src/engine/generic.py
CHANGED
|
@@ -3,11 +3,11 @@
|
|
| 3 |
|
| 4 |
# ytdlbot - generic.py
|
| 5 |
|
|
|
|
| 6 |
import os
|
| 7 |
from pathlib import Path
|
| 8 |
|
| 9 |
import yt_dlp
|
| 10 |
-
from pyrogram import types
|
| 11 |
|
| 12 |
from database.model import get_format_settings, get_quality_settings
|
| 13 |
from engine.base import BaseDownloader
|
|
@@ -96,6 +96,7 @@ class YoutubeDownload(BaseDownloader):
|
|
| 96 |
files = None
|
| 97 |
for f in formats:
|
| 98 |
ydl_opts["format"] = f
|
|
|
|
| 99 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
| 100 |
ydl.download([self._url])
|
| 101 |
files = list(Path(self._tempdir.name).glob("*"))
|
|
|
|
| 3 |
|
| 4 |
# ytdlbot - generic.py
|
| 5 |
|
| 6 |
+
import logging
|
| 7 |
import os
|
| 8 |
from pathlib import Path
|
| 9 |
|
| 10 |
import yt_dlp
|
|
|
|
| 11 |
|
| 12 |
from database.model import get_format_settings, get_quality_settings
|
| 13 |
from engine.base import BaseDownloader
|
|
|
|
| 96 |
files = None
|
| 97 |
for f in formats:
|
| 98 |
ydl_opts["format"] = f
|
| 99 |
+
logging.info("yt-dlp options: %s", ydl_opts)
|
| 100 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
| 101 |
ydl.download([self._url])
|
| 102 |
files = list(Path(self._tempdir.name).glob("*"))
|