예제 #1
0
        public void TestExtractAuthor()
        {
            YT2013Parser urlWrap = new YT2013Parser(dataURL);
            String author = urlWrap.extractAuthor();

            Assert.AreEqual("didipohu1", author);
        }
예제 #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");

            }
        }