Skip to content

Commit

Permalink
- Allow passing extra wget arguments in wget_cmd.
Browse files Browse the repository at this point in the history
Example:

	wget_cmd => "/usr/bin/wget --no-proxy",
  • Loading branch information
trizen committed Nov 1, 2021
1 parent 8e965f8 commit ee5de19
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/youtube-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -3914,8 +3914,10 @@ sub download_from_url {

# Download with wget
if ($opt{download_with_wget}) {
my @cmd = ($opt{wget_cmd}, '-c', '-t', '10', '--waitretry=3', $url, '-O', "$output_filename.part");
$yv_obj->proxy_system(@cmd);
my $cmd = join(' ',
$opt{wget_cmd}, '-c', '-t', '10', '--waitretry=3', quotemeta($url), '-O',
quotemeta("$output_filename.part"));
$yv_obj->proxy_system($cmd);
return if $?;
rename("$output_filename.part", $output_filename) or return undef;
return $output_filename;
Expand Down Expand Up @@ -5282,6 +5284,10 @@ If authentication is required, use:
'proto://user:[email protected]:port/'
For example, to use Tor, install L<LWP::Protocol::socks> and set this value to:
"socks://127.0.0.1:9050"
=head2 ignore_av1
Ignore videos in AV1 format.
Expand Down

0 comments on commit ee5de19

Please sign in to comment.