Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:18:08+00:00 2026-06-17T11:18:08+00:00

I usually use keepvid.com or a Firefox download helper plugin for dowloading YouTube videos.

  • 0

I usually use keepvid.com or a Firefox download helper plugin for dowloading YouTube videos. Is it possible to download them with the wget command available in Linux?

Also, I have a VPS server. I want to download videos on my VPS server (cPanel).

If is possible and if so how?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:18:09+00:00Added an answer on June 17, 2026 at 11:18 am
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    ## Two arguments
    ##    $1 YouTube URL from the browser
    ##    $2 Prefix to the file name of the video (optional)
    #
    
    ## Collect the URL from the command line argument
    my $url = $ARGV[0] or die "\nError: You need to specify a YouTube URL\n\n";
    
    ## Declare the user defined file name prefix
    my $prefix = defined($ARGV[1]) ? $ARGV[1] : "";
    
    ## Download the HTML code from the YouTube page
    my $html = `wget -Ncq -e "convert-links=off" --keep-session-cookies --save-cookies /dev/null --no-check-certificate "$url" -O-`  or die  "\nThere was a problem downloading the HTML file.\n\n";
    
    ## Collect the title of the page to use as the file name
    my ($title) = $html =~ m/<title>(.+)<\/title>/si;
    $title =~ s/[^\w\d]+/_/g;
    $title =~ s/_youtube//ig;
    $title =~ s/^_//ig;
    $title = lc ($title);
    
    ## Collect the URL of the video
    my ($download) = $html =~ /"url_encoded_fmt_stream_map"([\s\S]+?)\,/ig;
    
    ## Clean up the URL by translating Unicode and removing unwanted strings
    $download =~ s/\:\ \"//;
    $download =~ s/%3A/:/g;
    $download =~ s/%2F/\//g;
    $download =~ s/%3F/\?/g;
    $download =~ s/%3D/\=/g;
    $download =~ s/%252C/%2C/g;
    $download =~ s/%26/\&/g;
    $download =~ s/sig=/signature=/g;
    $download =~ s/\\u0026/\&/g;
    $download =~ s/(type=[^&]+)//g;
    $download =~ s/(fallback_host=[^&]+)//g;
    $download =~ s/(quality=[^&]+)//g;
    
    ## Collect the URL and signature since the HTML page randomizes the order
    my ($signature) = $download =~ /(signature=[^&]+)/;
    my ($youtubeurl) = $download =~ /(http.+)/;
    $youtubeurl =~ s/&signature.+$//;
    
    ## Combine the URL and signature in order to use in Wget
    $download = "$youtubeurl\&$signature";
    
    ## A bit more cleanup
    $download =~ s/&+/&/g;
    $download =~ s/&itag=\d+&signature=/&signature=/g;
    
    ## Print the file name of the video collected from the web page title for us to see on the CLI
    print "\n Download: $prefix$title.webm\n\n";
    
    ## Download the file using Wget and background the Wget process
    system("wget -Ncq -e \"convert-links=off\" --load-cookies /dev/null --tries=50 --timeout=45 --no-check-certificate \"$download\" -O $prefix$title.webm &");
    
    #### EOF #####
    

    This is a Perl script that I have been using for a while. I am not sure where it’s from though… It works great.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I usually use a TabControl and somehow hide the tabs and navigate through them.
I usually use Matlab's internal browser (via, say, the 'web' command), but it has
I usually use a boolean 'firstTime' like this: in C++: bool firsTime = true;
I usually use Visual Studio Team System 2008 Source Control Explorer with TFS, but
I usually use the following pipeline to grep for a particular search string and
I usually use this line to import file from out of the current folder
I usually use pointers in the following manner char *ptr = malloc( sizeof(char) *
I usually use ORM instead of SQL and I am slightly out of touch
I usually use JSON with jQuery to just return a string with html. However,
I usually use like this $ find -name testname.c ./dir1/dir2/testname.c $ vi ./dir1/dir2/testname.c it's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.