Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
blacklist HQ audio
Browse files Browse the repository at this point in the history
update UA
  • Loading branch information
nikooo777 committed Oct 12, 2023
1 parent 8f1d177 commit 6921c35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sources/newYtDownload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 6921c35

Please sign in to comment.