From 6921c35cda9a216afc0763e29f4443f049096217 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 12 Oct 2023 21:55:28 +0200 Subject: [PATCH] blacklist HQ audio update UA --- downloader/downloader.go | 2 +- sources/newYtDownload.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/downloader/downloader.go b/downloader/downloader.go index 7d62f86..8e971ee 100644 --- a/downloader/downloader.go +++ b/downloader/downloader.go @@ -87,7 +87,7 @@ func GetVideoInformation(videoID string, stopChan stop.Chan, pool *ip_manager.IP const ( GoogleBotUA = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" - ChromeUA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" + ChromeUA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" maxAttempts = 3 extractionError = "YouTube said: Unable to extract video data" throttledError = "HTTP Error 429" diff --git a/sources/newYtDownload.go b/sources/newYtDownload.go index 6c99e3e..800a701 100644 --- a/sources/newYtDownload.go +++ b/sources/newYtDownload.go @@ -284,7 +284,7 @@ func (v *YoutubeVideo) Download() error { } defer v.pool.ReleaseIP(sourceAddress) quality := qualities[qualityIndex] - dynamicArgs := append(ytdlArgs, "-fbestvideo[ext=mp4][vcodec!*=av01][vcodec!*=vp09][height<="+quality+"]+bestaudio[ext!=webm][format_id!=258][format_id!=380][format_id!=251][format_id!=256][format_id!=327][format_id!=328]") + dynamicArgs := append(ytdlArgs, "-fbestvideo[ext=mp4][vcodec!*=av01][vcodec!*=vp09][height<="+quality+"]+bestaudio[ext!=webm][format_id!=258][format_id!=380][format_id!=251][format_id!=256][format_id!=327][format_id!=328][format_id!=380]") dynamicArgs = append(dynamicArgs, userAgent...) dynamicArgs = append(dynamicArgs, "--source-address",