Merge pull request #204 from NexonSU/master

impersonate support
This commit is contained in:
Mattias Wadman
2024-09-10 10:11:16 +02:00
committed by GitHub

View File

@ -224,6 +224,7 @@ type Options struct {
DownloadThumbnail bool DownloadThumbnail bool
DownloadSubtitles bool DownloadSubtitles bool
DownloadSections string // --download-sections DownloadSections string // --download-sections
Impersonate string // --impersonate
ProxyUrl string // --proxy URL http://host:port or socks5://host:port ProxyUrl string // --proxy URL http://host:port or socks5://host:port
UseIPV4 bool // -4 Make all connections via IPv4 UseIPV4 bool // -4 Make all connections via IPv4
@ -332,6 +333,10 @@ func infoFromURL(
cmd.Args = append(cmd.Args, "--downloader", options.Downloader) cmd.Args = append(cmd.Args, "--downloader", options.Downloader)
} }
if options.Impersonate != "" {
cmd.Args = append(cmd.Args, "--impersonate", options.Impersonate)
}
if options.Cookies != "" { if options.Cookies != "" {
cmd.Args = append(cmd.Args, "--cookies", options.Cookies) cmd.Args = append(cmd.Args, "--cookies", options.Cookies)
} }