Git Product home page Git Product logo

Comments (6)

SlowLogicBoy avatar SlowLogicBoy commented on May 27, 2024 1

using YoutubeExplode.Models;

from youtubeexplode.

azizullah-masology avatar azizullah-masology commented on May 27, 2024

Thanks for you replay...
now another issue.. This is my sample code:

`var client = new YoutubeClient();

        // Get video info
        string videoId = "";
        if (!YoutubeClient.TryParseVideoId(videoUrl, out videoId))
            videoId = videoUrl;

        var videoInfo = await client.GetVideoInfoAsync(videoId);`

When it comes to this line var videoInfo = await client.GetVideoInfoAsync(videoId) then program breaks and stops and does not move one another step after that.

from youtubeexplode.

SlowLogicBoy avatar SlowLogicBoy commented on May 27, 2024

If it breaks there, that means it has thrown an exception, and visual studio shows which exception was thrown (Visual studio / debugging basics). So to help you out we need to know which exception was that.
Possibe problems are:

  1. videoId = videoUrl; and client.GetVideoInfoAsync(videoId); doesn't accept url's (as far as I know).
  2. No internet connection
  3. Video was removed from youtube or it is not available in your country.

from youtubeexplode.

Tyrrrz avatar Tyrrrz commented on May 27, 2024

It doesn't accept urls, but the following

string videoId = "";
if (!YoutubeClient.TryParseVideoId(videoUrl, out videoId))
    videoId = videoUrl;

Tries to extract id from url and if it fails - it just returns the input string. So it's also possible the video id is invalid.

Like SlowLogicBoy said, we need to know the exact exception.

from youtubeexplode.

azizullah-masology avatar azizullah-masology commented on May 27, 2024

Actually the reason is that.... It throw no exception. I put that line in try catch also... but no exception.
And another thing... I am using vs2013, is that a problem? because as far as I know this library is written in .net core

from youtubeexplode.

Tyrrrz avatar Tyrrrz commented on May 27, 2024

It can't break without an exception, unless you have a breakpoint there. VS version doesn't matter.

from youtubeexplode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.