From 79870cf4a7424eaf08cb5e781c49ef16c1768b7d Mon Sep 17 00:00:00 2001 From: yanistyle Date: Tue, 1 Sep 2026 02:16:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20universal.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- universal.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/universal.py b/universal.py index fca9a49..dc7a63d 100644 --- a/universal.py +++ b/universal.py @@ -1,4 +1,4 @@ -# meta developer: @origsama +# meta developer: @HoroshoVse # requires: yt-dlp from .. import loader, utils import requests @@ -9,6 +9,7 @@ import tempfile import urllib.parse import json import shutil +import sys @loader.tds class SocialDownloaderMod(loader.Module): @@ -104,7 +105,7 @@ class SocialDownloaderMod(loader.Module): output_template = os.path.join(temp_dir, '%(title)s.%(ext)s') cmd = [ - 'yt-dlp', + sys.executable, '-m', 'yt_dlp', '-f', 'best[filesize<50M]', '--max-filesize', f"{self.config['max_size']}M", '-o', output_template, @@ -141,7 +142,7 @@ class SocialDownloaderMod(loader.Module): async def get_video_info(self, url): try: - cmd = ['yt-dlp', '--dump-json', '--no-playlist', url] + cmd = [sys.executable, '-m', 'yt_dlp', '--dump-json', '--no-playlist', url] process = await asyncio.create_subprocess_exec( *cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE ) @@ -197,7 +198,7 @@ class SocialDownloaderMod(loader.Module): output_template = os.path.join(temp_dir, '%(title)s.%(ext)s') cmd = [ - 'yt-dlp', + sys.executable, '-m', 'yt_dlp', '-f', f'best[height<={quality}]' if quality != 'best' else 'best', '--max-filesize', f"{self.config['max_size']}M", '-o', output_template,