Youtubeexplode: Demo's broken?

Created on 16 Jun 2017  路  5Comments  路  Source: Tyrrrz/YoutubeExplode

The console demo is broken for me.
What is broken you might ask?

  • doesnt have a field called id
  • char - does not contain a .Repeat() method (try "".PadRight(100, '-'); instead)
  • filename = filename.exept cannot be converted. A string.Join([the linq statement]); is needed
question

All 5 comments

Have you restored all your nuget packages?

char - does not contain a .Repeat() method (try "".PadRight(100, '-'); instead)
filename = filename.exept cannot be converted. A string.Join([the linq statement]); is needed

Install-Package Tyrrrz.Extensions
using Tyrrrz.Extensions;

Install-Package Tyrrrz.Extensions
using Tyrrrz.Extensions;

Should explain the issue.
I was not aware of the need to install Tyrrrz.Extensions aswell i thought only YoutubeExplode.

Thanks for the quick reply.

if (!YoutubeClient.TryParseVideoId(input, out string id))
                id = input;

for this to work you need C# 7 i think

i just added a local variable, worked like a charm afterwards:

string id;

if (!YoutubeClient.TryParseVideoId(input, out id))
    id = input;

return id;

@NoobInTraining yeah both demos use some extra dependencies, they should be resolved with package restore. YoutubeExplode itself is not dependent on Tyrrrz.Extensions and can be used without it.
The examples in https://github.com/Tyrrrz/YoutubeExplode/wiki/Usage-examples can be freely copy-pasted into your code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nk34player picture nk34player  路  4Comments

ac-lap picture ac-lap  路  7Comments

Tyrrrz picture Tyrrrz  路  4Comments

jungjanos picture jungjanos  路  6Comments

jvitoroc picture jvitoroc  路  8Comments