Обновить universal.py
This commit is contained in:
+5
-5
@@ -1,5 +1,5 @@
|
|||||||
# meta developer: @HoroshoVse
|
# meta developer: @origsama
|
||||||
# requires: yt-dlp
|
# requires: yt-dlp curl_cffi
|
||||||
from .. import loader, utils
|
from .. import loader, utils
|
||||||
import requests
|
import requests
|
||||||
import re
|
import re
|
||||||
@@ -113,9 +113,9 @@ class SocialDownloaderMod(loader.Module):
|
|||||||
]
|
]
|
||||||
|
|
||||||
if source.lower() == 'tiktok':
|
if source.lower() == 'tiktok':
|
||||||
cmd.extend(['--cookies', 'tiktok_cookies.txt'])
|
cmd.extend(['--cookies', 'tiktok_cookies.txt', '--impersonate', 'Chrome'])
|
||||||
elif source.lower() == 'instagram':
|
elif source.lower() == 'instagram':
|
||||||
cmd.extend(['--cookies', 'instagram_cookies.txt'])
|
cmd.extend(['--cookies', 'instagram_cookies.txt', '--impersonate', 'Chrome'])
|
||||||
|
|
||||||
process = await asyncio.create_subprocess_exec(
|
process = await asyncio.create_subprocess_exec(
|
||||||
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
||||||
@@ -142,7 +142,7 @@ class SocialDownloaderMod(loader.Module):
|
|||||||
|
|
||||||
async def get_video_info(self, url):
|
async def get_video_info(self, url):
|
||||||
try:
|
try:
|
||||||
cmd = [sys.executable, '-m', 'yt_dlp', '--dump-json', '--no-playlist', url]
|
cmd = [sys.executable, '-m', 'yt_dlp', '--dump-json', '--no-playlist', '--impersonate', 'Chrome', url]
|
||||||
process = await asyncio.create_subprocess_exec(
|
process = await asyncio.create_subprocess_exec(
|
||||||
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user