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 8295667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:41:17+00:00 2026-06-08T14:41:17+00:00

When I pass http://www.youtube.com/watch?v=Zi8vJ_lMxQI as a parameter, the HTML code is downloaded instead of

  • 0

When I pass

http://www.youtube.com/watch?v=Zi8vJ_lMxQI

as a parameter, the HTML code is downloaded instead of the video.

public void StreamDownload(Uri currentUrl)
        {
            int dataLength;
            int bytesRead;

            WebRequest req = WebRequest.Create(currentUrl);
            WebResponse response = req.GetResponse();
            string oFileName = System.IO.Path.GetFileName(URLBox.Text);

            oFileName = AdditionalFunctions.CorrectFname(oFileName); //this function replaces forbidden characters with '♥'.

            Stream dataStream = response.GetResponseStream();

            byte [] buffer = new byte[1024];

            FileStream oFile = new FileStream(oFileName,FileMode.Append);

            dataLength = (int)response.ContentLength;

            do
            {
                bytesRead = dataStream.Read(buffer, 0, buffer.Length);
                oFile.Write(buffer, 0, bytesRead);
            }
            while (bytesRead != 0);
        }

Edited due to the comments
Is there an universal algorithm to extract an video stream from a specified URL? Youtube was only an example.

  • 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-08T14:41:20+00:00Added an answer on June 8, 2026 at 2:41 pm

    As I stated in comment: WEBPAGE (what you get from your URL) is something that carries PLAYER component for the media that will be accessed from it by means of some kind of streaming.

    So first, you have to parse the web page to find if your stream URL is there somewhere. If it isn’t it would require some kind of network packet capture to determine what connection was recently open from the process that tries to load/play the video, and then capture the data from that connection.

    Tricky stuff.

    For youtube:

    Downloading video from YouTube

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

Sidebar

Related Questions

imagine this url: http://www.youtube.com/watch?v=6n8PGnc_cV4&feature=rec-LGOUT-real_rn-2r-13-HM what is the cleanest and best regexp to do the
I've been following this tutorial - http://www.youtube.com/watch?v=R2hOvZ7bwXU , which explains how to use postMessage
Best way to extract the minutes and seconds from youtube urls? http://www.youtube.com/watch?v=TjTbNWhsG28#t=1m40s&foo=1&bar=2 where 1m40s
I've made some regex to test for a YouTube embedded video: /^(http:\/\/www\.youtube\.com\/embed\/)[^\/\s\\]+$/ It works
http://www.domainname.com/#changepassword I need to pass an extra variable with a URL like above. I've
I have an web address: http://www.example.com/org/companyA I want to be able to pass CompanyA
I used a login script tutorial here: http://www.astahost.com/info/tilltf-simple-login-script-simple-secure-login-script.html and when I clocked login, there
I've set up my subversion server following the steps on : http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html The server
Say I have http://www.domain.com/whatever-with-hyphens-6.shml And I want to pass whatever-with-hyphens and 6 to my
I am trying to pass parameters to a URL which looks like this: http://www.foobar.com/foo?imageurl=

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.