omansak / libvideo

A lightweight .NET library to download YouTube videos.
BSD 2-Clause "Simplified" License
553 stars 163 forks source link

GetUri Exception #124

Closed SergeyDCT closed 4 years ago

SergeyDCT commented 5 years ago

var video = cli.GetVideo(query); string uri = video.GetUri();

                try
                {
                    var uris = DownloadUrlResolver
                        .GetDownloadUrls(query)
                        .Select(v => v.DownloadUrl);

                    Console.WriteLine($"Link #{i + 1}");
                    foreach (var v in uris)
                    {
                        Console.WriteLine(v);
                        Console.WriteLine();
                    }
                }
                catch(Exception ex)
                {
                }

I get Exception Message Could not parse the Youtube page for URL http://youtube.com/watch?v=2vjPBrBU-TM\nThis may be due to a change of the Youtube page structure.\nPlease report this bug at www.github.com/flagbug/YoutubeExtractor/issues

Gr3gorywolf commented 5 years ago

@omansak what is the new decrypt regex??

omansak commented 5 years ago

@Gr3gorywolf It is not decrypt issue. Randomly Youtube generate different signature . I working on it

omansak commented 5 years ago

@Gr3gorywolf @SergeyDCT test my last commit #125 (https://github.com/omansak/libvideo)

SergeyDCT commented 5 years ago

@Gr3gorywolf @SergeyDCT test my last commit #125 (https://github.com/omansak/libvideo)

thank you!

SergeyDCT commented 5 years ago

@Gr3gorywolf @SergeyDCT test my last commit #125 (https://github.com/omansak/libvideo)

var video = cli.GetVideo("https://www.youtube.com/watch?v=4OH3JZyLVJE"); string uri = video.GetUri(); this.mediaElement.Source = new Uri(uri); I get an error while playing this uri. MediaElement Failed with Exception ErrorMessage = "MF_MEDIA_ENGINE_ERR_DECODE : HRESULT - 0xC00D4A3E"

omansak commented 5 years ago

@SergeyDCT it's decrypt issue.

New Regez : \bc\s*&&\s*a\.set\([^,]+,\s*(?:encodeURIComponent\s*\()?\s*([\w$]+)\(

omansak commented 5 years ago

@SergeyDCT test my last commit #125 (https://github.com/omansak/libvideo)

SergeyDCT commented 5 years ago

@SergeyDCT it's decrypt issue.

New Regez : \bc\s*&&\s*a\.set\([^,]+,\s*(?:encodeURIComponent\s*\()?\s*([\w$]+)\(

thank you