fix: argumentos yt-dlp
This commit is contained in:
parent
b741b26e24
commit
f2b61e9e76
@ -21,10 +21,18 @@ namespace YTExtractor.Services.Handlers
|
|||||||
{
|
{
|
||||||
_logger.LogInformation("Getting video info using yt-dlp for {Url}", url);
|
_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
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "yt-dlp",
|
FileName = "yt-dlp",
|
||||||
Arguments = $"--dump-json {url}",
|
//Arguments = $"--dump-json {url}",
|
||||||
|
Arguments = arguments,
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
CreateNoWindow = true,
|
CreateNoWindow = true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user