Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var downloadCli = new DownloadCli(new YoutubeDownloadFactory(new List <Action <object, DataReceivedEventArgs> >
            {
                (o, eventArgs) => Console.WriteLine(eventArgs.Data)
            }, new List <Action <object, DataReceivedEventArgs> >
            {
                (o, eventArgs) => Console.WriteLine(eventArgs.Data)
            }));

            downloadCli.Download("https://www.youtube.com/watch?v=b8HO6hba9ZE", "~/Desktop", false);
            downloadCli.Download("https://www.youtube.com/watch?v=b8HO6hba9ZE", "~/Desktop", true);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var downloadCli = new DownloadCli(new GetIplayerDownloadFactory(new List <Action <object, DataReceivedEventArgs> >
            {
                (o, eventArgs) => Console.WriteLine(eventArgs.Data)
            }, new List <Action <object, DataReceivedEventArgs> >
            {
                (o, eventArgs) => Console.WriteLine(eventArgs.Data)
            }));

            downloadCli.Download(new List <string>
            {
                "https://www.bbc.co.uk/programmes/m000cbh9",
                "https://www.bbc.co.uk/programmes/m000cbh7"
            }, "/home/adam/Desktop", false);

            downloadCli.Download("https://www.bbc.co.uk/programmes/m000c30y", "/home/adam/Desktop", true);
        }