Example #1
0
        static async void GetVideoFregment(string vid, string fn, SharpItem vi, Action <int> callback)
        {
            string str = "platform=11&otype=xml&vids=" + vid + "&format=" + vi.fid + "&filename=" + fn + vi.pid;
            int    c   = 2;

            l :;
            string cc = str + c.ToString() + ".mp4";

            cc = await NetClass.Post("http://vv.video.qq.com/getkey", cc,
                                     "http://imgcache.qq.com/tencentvideo_v1/playerv3/TencentPlayer.swf?max_age=86400&v=20160819");

            char[] tc = cc.ToCharArray();
            //Debug.WriteLine(new string(DeleteChar(ref tc, '/')));
            if (FindCharArray(ref tc, ref Key_key, 0) > 0)
            {
                c++; goto l;
            }
            c--;
            callback(c);
        }
Example #2
0
        static async void GetVideoInfo(string p, string vid, Action <VideoInfoA> callback)
        {
            string s = await NetClass.Post("http://vv.video.qq.com/getinfo", p,
                                           "http://imgcache.qq.com/tencentvideo_v1/playerv3/TencentPlayer.swf?max_age=86400&v=20161114");

            char[] c = s.ToCharArray();
            c = DeleteChar(ref c, '\\');
            //Debug.WriteLine(new string(c));
            VideoInfoA vi = new VideoInfoA();

            vi.vid  = vid;
            vi.http = GetHttp(ref c);
            GetVI(ref c, ref vi);
            if (vi.fregment > 0)
            {
                string[] md5 = new string[vi.fregment];
                GetCmd5(ref c, ref md5);
                vi.cmd5 = md5;
            }
            callback(vi);
        }
Example #3
0
        static async void GetVideoKey(string vid, string fn, SharpItem vi, Action <string, int> callback, int part)
        {
            string str = "platform=11&otype=xml&vids=" + vid + "&format=" + vi.fid + "&filename=" + fn + vi.pid;

            str += part.ToString() + ".mp4";
            str  = await NetClass.Post("http://vv.video.qq.com/getkey", str,
                                       "http://imgcache.qq.com/tencentvideo_v1/playerv3/TencentPlayer.swf?max_age=86400&v=20161114");

            char[] tc  = str.ToCharArray();
            int    ccc = 0;

            tc = FindCharArrayA(ref tc, ref Key_key, ref Key_less, ref ccc);
            if (tc != null)
            {
                str = new string(tc);
                callback(str, part);
            }
            else
            {
                callback(null, part);
            }
        }
Example #4
0
        public async Task <string> GetPartVkey(int part)
        {
            SharpItem vi  = via.vi[sharpindex];
            string    str = "platform=11&otype=xml&vids=" + vid + "&format=" + vi.fid + "&filename=" + via.fn + vi.pid;

            str += part.ToString() + ".mp4";
            str  = await NetClass.Post("http://vv.video.qq.com/getkey", str,
                                       "http://imgcache.qq.com/tencentvideo_v1/playerv3/TencentPlayer.swf?max_age=86400&v=20161114");

            //Debug.WriteLine(str);
            char[] tc  = str.ToCharArray();
            int    ccc = 0;

            tc = FindCharArrayA(ref tc, ref Key_key, ref Key_less, ref ccc);
            if (tc != null)
            {
                return(new string(tc));
            }
            else
            {
                return(null);
            }
        }