public void TestExtractStatus()
        {
            YT2013Parser urlWrap = new YT2013Parser(dataURL);
            String status = urlWrap.extractStatus();

            Assert.AreEqual("ok", status);
        }
Exemple #2
0
        private void AnalyseVideoInfoURL(String aURLInfo)
        {
            IUrlParser urlParser = new YT2013Parser(aURLInfo);

            String status = urlParser.extractStatus();

            if (status.Equals("ok"))
            {

                this.title = urlParser.extractTitle();
                this.author = urlParser.extractAuthor();
                this.length = urlParser.extractLengthSeconds();
                this.AnalyseVideoStreamMap(urlParser.extractStreamMap());
            }
            else if(status.Equals("fail"))
            {
                String errno = urlParser.extractErrNo();
                String reason = urlParser.extractReason();

                MessageBox.Show("Error number" + errno + " Reason: " + reason, "Cannot load Youtube Video File");

            }
        }