impersonate arg
This commit is contained in:
@ -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)
|
||||||
}
|
}
|
||||||
@ -639,6 +644,10 @@ func (result Result) DownloadWithOptions(
|
|||||||
cmd.Args = append(cmd.Args, "--audio-format", options.AudioFormats)
|
cmd.Args = append(cmd.Args, "--audio-format", options.AudioFormats)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if result.Options.Impersonate != "" {
|
||||||
|
cmd.Args = append(cmd.Args, "--impersonate", result.Options.Impersonate)
|
||||||
|
}
|
||||||
|
|
||||||
if result.Options.ProxyUrl != "" {
|
if result.Options.ProxyUrl != "" {
|
||||||
cmd.Args = append(cmd.Args, "--proxy", result.Options.ProxyUrl)
|
cmd.Args = append(cmd.Args, "--proxy", result.Options.ProxyUrl)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user