fix: argumentos yt-dlp #28

Merged
ricardo merged 1 commits from release/V1.0.0 into main 2025-05-28 04:55:32 +00:00
Showing only changes of commit f2b61e9e76 - Show all commits

View File

@ -21,10 +21,18 @@ namespace YTExtractor.Services.Handlers
{
_logger.LogInformation("Getting video info using yt-dlp for {Url}", url);
var arguments = $"--dump-json " +
$"--user-agent \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\" " +
$"--add-header \"Accept-Language:pt-BR,pt;q=0.9,en;q=0.8\" " +
$"--add-header \"Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" " +
$"--no-check-certificate " +
$"{url}";
var startInfo = new ProcessStartInfo
{
FileName = "yt-dlp",
Arguments = $"--dump-json {url}",
//Arguments = $"--dump-json {url}",
Arguments = arguments,
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,