Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

c# get youtube video id from url

|_Genos_| answered on May 23, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • get youtube id from url javascript
  • how toget image from a youtube video url
  • how to show youtube video in browser using html from url.
  • how to show youtube video in browser using html from url.
  • How do I get a YouTube video thumbnail from the YouTube API?
  • load youtube iframe player api
  • find youtube channel id from url
  • get channel id from youtube url

  • c# get youtube video id from url

    0

    // For embed link:

    var url = @"https://www.youtube.com/watch?v=6QlW4m9xVZY";

    var uri = new Uri(url);

    // you can check host here => uri.Host <= "www.youtube.com"

    var query = HttpUtility.ParseQueryString(uri.Query);

    var videoId = query["v"];

    // videoId = 6QlW4m9xVZY 



    // For youtube/watch link:

    var url = "http://youtu.be/AAAAAAAAA09";

    var uri = new Uri(url);

    var videoid = uri.Segments.Last(); // AAAAAAAAA09 

    Popularity 3/10 Helpfulness 1/10 Language csharp
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    |_Genos_|
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.