Exemplo n.º 1
0
 public ManualCodec(IEmittingCodec emittingCodec) : base(typeof(T), emittingCodec)
 {
     calculateSizeDelegate = (CalculateSizeDelegate)CalculateSizeMethod.CreateDelegate(typeof(CalculateSizeDelegate));
     encodeDelegate        = (EncodeDelegate)EncodeMethod.CreateDelegate(typeof(EncodeDelegate));
     decodeDelegate        = (DecodeDelegate)DecodeMethod.CreateDelegate(typeof(DecodeDelegate));
     decodeFastDelegate    = (DecodeDelegate)DecodeFastMethod.CreateDelegate(typeof(DecodeDelegate));
 }
Exemplo n.º 2
0
        private string encodeKeywords(string script)
        {
            // escape high-ascii values already in the script (i.e. in strings)
            if (Encoding == PackerEncoding.HighAscii)
            {
                script = escape95(script);
            }
            // create the parser
            ParseMaster  parser = new ParseMaster();
            EncodeMethod encode = getEncoder(Encoding);

            // for high-ascii, don't encode single character low-ascii
            Regex regex = new Regex(
                (Encoding == PackerEncoding.HighAscii) ? "\\w\\w+" : "\\w+"
                );

            // build the word list
            encodingLookup = analyze(script, regex, encode);

            // encode
            parser.Add((Encoding == PackerEncoding.HighAscii) ? "\\w\\w+" : "\\w+",
                       new ParseMaster.MatchGroupEvaluator(encodeWithLookup));

            // if encoded, wrap the script in a decoding function
            return((script == string.Empty) ? "" : bootStrap(parser.Exec(script), encodingLookup));
        }
Exemplo n.º 3
0
        public void EncodeValue(object value)
        {
            if (ValueSupported(value))
            {
                Value(value);
            }
            else
            {
                var type = value.GetType();

                EncodeMethod encode = null;
                //Try a dictionary first
                if (type.HasInterface(typeof(IDictionary)))
                {
                    encode = GetTypeEncoder(typeof(IDictionary));
                }
                else if (type.HasInterface(typeof(IEnumerable)))
                {
                    encode = GetTypeEncoder(typeof(IEnumerable));
                }
                else
                {
                    encode = GetTypeEncoder(value.GetType());
                }
                if (encode != null)
                {
                    encode(value, this);
                }
                else
                {
                    Encode(value);
                }
            }
        }
Exemplo n.º 4
0
 public ManualCodec(ICodecContainer codecContainer, IEmittingCodec emittingCodec) : base(typeof(T), emittingCodec)
 {
     this.codecContainer   = codecContainer;
     calculateSizeDelegate = (CalculateSizeDelegate)CalculateSizeMethod.CreateDelegate(typeof(CalculateSizeDelegate));
     encodeDelegate        = (EncodeDelegate)EncodeMethod.CreateDelegate(typeof(EncodeDelegate));
     decodeDelegate        = (DecodeDelegate)DecodeMethod.CreateDelegate(typeof(DecodeDelegate));
     decodeFastDelegate    = (DecodeDelegate)DecodeFastMethod.CreateDelegate(typeof(DecodeDelegate));
 }
Exemplo n.º 5
0
        private WordList analyze(string input, Regex regex, EncodeMethod encodeMethod)
        {
            MatchCollection all = regex.Matches(input);
            WordList        rtrn;

            rtrn.Sorted    = new StringCollection(); // list of words sorted by frequency
            rtrn.Protected = new HybridDictionary(); // dictionary of word->encoding
            rtrn.Encoded   = new HybridDictionary(); // instances of "protected" words
            if (all.Count > 0)
            {
                StringCollection unsorted = new StringCollection();  // same list, not sorted
                HybridDictionary Protected = new HybridDictionary(); // "protected" words (dictionary of word->"word")
                HybridDictionary values = new HybridDictionary();    // dictionary of charCode->encoding (eg. 256->ff)
                HybridDictionary count = new HybridDictionary();     // word->count
                int    i = all.Count, j = 0;
                string word;
                do
                {
                    word = "$" + all[--i].Value;
                    if (count[word] == null)
                    {
                        count[word] = 0;
                        unsorted.Add(word);
                        Protected["$" + (values[j] = encodeMethod(j))] = j++;
                    }
                    count[word] = (int)count[word] + 1;
                } while (i > 0);

                i = unsorted.Count;
                string[] sortedarr = new string[unsorted.Count];
                do
                {
                    word = unsorted[--i];
                    if (Protected[word] != null)
                    {
                        sortedarr[(int)Protected[word]]      = word.Substring(1);
                        rtrn.Protected[(int)Protected[word]] = true;
                        count[word] = 0;
                    }
                } while (i > 0);
                string[] unsortedarr = new string[unsorted.Count];
                unsorted.CopyTo(unsortedarr, 0);
                Array.Sort(unsortedarr, (IComparer) new CountComparer(count));
                j = 0;

                do
                {
                    if (sortedarr[i] == null)
                    {
                        sortedarr[i] = unsortedarr[j++].Substring(1);
                    }
                    rtrn.Encoded[sortedarr[i]] = values[i];
                }               while (++i < unsortedarr.Length);
                rtrn.Sorted.AddRange(sortedarr);
            }
            return(rtrn);
        }
Exemplo n.º 6
0
        static void AddDefaults()
        {
            defaultTypeEncoder = ((obj, builder) =>
            {
                Type type = obj.GetType();
                builder.BeginObject();

                builder.WriteTypeInfoIfAttributePresent(type);

                obj.EnumerateFields(DEFAULT_JSON_BINDING_FLAGS, (targetObj, field, jsonName) =>
                {
                    var value = field.GetValue(targetObj);
                    builder.EncodePair(jsonName, value);

                    //Format for another name value pair
                    builder.Indent();
                    builder.Comma();
                    builder.LineBreak();
                });

                builder.EndObject();
            });

            SetTypeEncoder(typeof(IEnumerable), (obj, builder) =>
            {
                builder.BeginArray();
                builder.LineBreak();
                foreach (var item in (IEnumerable)obj)
                {
                    builder.Indent();
                    builder.EncodeValue(item);
                    builder.Comma();
                    builder.LineBreak();
                }
                builder.EndArray();
            });

            SetTypeEncoder(typeof(IDictionary), (obj, builder) =>
            {
                builder.BeginObject();
                var table = obj as IDictionary;
                foreach (var key in table.Keys)
                {
                    builder.Indent();
                    builder.EncodePair(key.ToString(), table[key]);
                    builder.Comma();
                    builder.LineBreak();
                }
                builder.EndObject();
            });
        }
Exemplo n.º 7
0
        /// <summary>
        /// 对明文数据进行加密
        /// </summary>
        /// <param name="text">明文数据</param>
        /// <returns>加密后的数据</returns>
        public static String EncryptedRequest(String text)
        {
            // key
            var secKey = CreateSecretKey(16);

            //Console.WriteLine($"secKey:{secKey}");
            //有时候会失败  所以直接固定密钥了
            secKey = "oUCb6k473aBQFUgv";
            // aes
            var encTextFisrt = AesEncrypt(text, nonce, iv);
            var encText      = AesEncrypt(encTextFisrt, secKey, iv);
            // rsa
            var encSecKey = RsaEncrypt(secKey, pubKey, modulus);

            Console.WriteLine(encSecKey);
            var data = $"params={EncodeMethod.Encode( EncodeType.UrlEncode, encText)}&encSecKey={encSecKey}";

            return(data);
        }
Exemplo n.º 8
0
        public EncodeMethod GetTypeEncoderOrDefault(Type type)
        {
            EncodeMethod callback = GetTypeEncoder(type);

            if (callback == null)
            {
                if (type.HasInterface(typeof(IDictionary)))
                {
                    callback = GetTypeEncoder(typeof(IDictionary));
                }
                else if (type.HasInterface(typeof(IEnumerable)))
                {
                    callback = GetTypeEncoder(typeof(IEnumerable));
                }

                if (callback == null)
                {
                    callback = defaultTypeEncoder;
                }
            }
            return(callback);
        }
Exemplo n.º 9
0
        private List <IMusicInfo> GetMusic(string disstid, int count)
        {
            var temploginlinfo         = (LoginInfo_QQ)logininfo;
            List <IMusicInfo> musics   = new List <IMusicInfo>();
            String            postdata = JsonConvert.SerializeObject(new
            {
                req_0 = new
                {
                    module = "srf_diss_info.DissInfoServer",
                    method = "CgiGetDiss",
                    param  = new
                    {
                        disstid      = Convert.ToInt64(disstid),
                        onlysonglist = 1,
                        song_begin   = 0,
                        song_num     = count,
                    }
                },
                comm = new
                {
                    g_tk     = Convert.ToInt32(temploginlinfo.csrf_token),
                    uin      = Convert.ToInt32(temploginlinfo.qqnum),
                    format   = "json",
                    platform = "h5"
                }
            });

            //标准头
            HttpItem item = new HttpItem();

            item.URL         = $"https://u.y.qq.com/cgi-bin/musics.fcg?sign={getSign(postdata)}&_={EncodeMethod.GetTimeSamp()}";
            item.UserAgent   = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";
            item.ContentType = "application/json";
            item.Accept      = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
            item.Method      = "POST";
            item.Postdata    = postdata;
            //这一步不需要cookie
            //item.Cookie = logininfo.cookie;
            //自定义头
            item.Header.Add("Accept-Encoding", "gzip, deflate");
            String html = HttpMethod.HttpWork(item).Html;

            Console.WriteLine(html);
            if (JsonConvert.DeserializeObject(html) is JObject jobj)
            {
                if (Convert.ToInt32(jobj.SelectToken("code")) == 0)
                {
                    var songs = jobj.SelectTokens("req_0.data.songlist[*]");
                    foreach (var tk in songs)
                    {
                        String albumid = Convert.ToString(tk.SelectToken("album.mid"));
                        musics.Add(new MusicInfo_QQ
                        {
                            album        = Convert.ToString(tk.SelectToken("album.name")),
                            albumid_qq   = Convert.ToString(tk.SelectToken("album.id")),
                            album_mid_qq = albumid,
                            albumpic_qq  = $"https://y.gtimg.cn/music/photo_new/T002R300x300M000{albumid}_1.jpg?max_age=2592000",
                            musicid_qq   = Convert.ToString(tk.SelectToken("id")),
                            music_mid_qq = Convert.ToString(tk.SelectToken("mid")),
                            name         = Convert.ToString(tk.SelectToken("name")),
                            time         = TimeConverter.ToMinSecond(Convert.ToInt32(tk.SelectToken("interval")) * 1000),
                            songStatue   = GetMusicSattue(Convert.ToInt32(tk.SelectToken("pay.pay_play")), Convert.ToInt32(tk.SelectToken("pay.pay_down")), Convert.ToInt32(tk.SelectToken("pay.price_track"))),
                            singers      = GetSingers(tk.SelectTokens("singer[*]"))
                        });
                    }
                }
            }
            return(musics);
        }
Exemplo n.º 10
0
        /// <summary>
        /// q音搜索联想接口没有专辑信息
        /// </summary>
        /// <param name="parms">0 keyword</param>
        /// <returns></returns>
        public override List <IMusicInfo> SearchMusic_Suggest(params object[] parms)
        {
            LoginInfo_QQ      temploginlinfo = (LoginInfo_QQ)logininfo;
            List <IMusicInfo> musics         = new List <IMusicInfo>();
            //标准头
            HttpItem item = new HttpItem();

            item.URL         = $"https://c.y.qq.com/splcloud/fcgi-bin/smartbox_new.fcg?is_xml=0&key={EncodeMethod.Encode(EncodeType.UrlEncode, parms[0])}&g_tk_new_20200303={temploginlinfo.csrf_token}&g_tk={temploginlinfo.csrf_token}&loginUin={temploginlinfo.qqnum}&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0";
            item.UserAgent   = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36";
            item.Referer     = "https://y.qq.com/portal/profile.html";
            item.ContentType = "application/x-www-form-urlencoded";
            item.Accept      = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
            item.Cookie      = logininfo.cookie;
            //自定义头
            item.Header.Add("Accept-Encoding", "gzip, deflate");
            String html = HttpMethod.HttpWork(item).Html;

            try
            {
                if (JsonConvert.DeserializeObject(html) is JObject jobj)
                {
                    int code = Convert.ToInt32(jobj.SelectToken("code"));
                    if (code == 0)
                    {
                        foreach (var tk in jobj.SelectTokens("data.song.itemlist[*]"))
                        {
                            musics.Add(new MusicInfo_QQ
                            {
                                musicid_qq   = Convert.ToString(tk.SelectToken("id")),
                                music_mid_qq = Convert.ToString(tk.SelectToken("mid")),
                                name         = Convert.ToString(tk.SelectToken("name")),
                                singers      = new List <ISingerInfo> {
                                    new SingerInfo_QQ {
                                        platform = PlatformType.MusicQQ, name = Convert.ToString(tk.SelectToken("singer"))
                                    }
                                }
                            });
                        }
                    }
                    else
                    {
                    }
                    Console.WriteLine(html);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            Console.WriteLine(JsonConvert.SerializeObject(musics));
            return(musics);
        }
Exemplo n.º 11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parms">0 keyword</param>
        /// <returns></returns>
        public override List <IMusicInfo> SearchMusic(params object[] parms)
        {
            LoginInfo_QQ      temploginlinfo = (LoginInfo_QQ)logininfo;
            List <IMusicInfo> musics         = new List <IMusicInfo>();
            //标准头
            HttpItem item = new HttpItem();

            item.URL         = $"https://c.y.qq.com/soso/fcgi-bin/client_search_cp?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=txt.yqq.song&searchid=&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=1&n=20&w={EncodeMethod.Encode( EncodeType.UrlEncode,parms[0])}&g_tk_new_20200303={temploginlinfo.csrf_token}&g_tk={temploginlinfo.csrf_token}&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0";
            item.UserAgent   = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36";
            item.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
            item.Accept      = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
            //自定义头
            item.Header.Add("Accept-Encoding", "gzip, deflate");
            String html = HttpMethod.HttpWork(item).Html;

            try
            {
                if (JsonConvert.DeserializeObject(html) is JObject jobj)
                {
                    int code = Convert.ToInt32(jobj.SelectToken("code"));
                    if (code == 0)
                    {
                        foreach (var tk in jobj.SelectTokens("data.song.list[*]"))
                        {
                            String albumid = Convert.ToString(tk.SelectToken("album.mid"));
                            musics.Add(new MusicInfo_QQ
                            {
                                album        = Convert.ToString(tk.SelectToken("album.name")),
                                albumid_qq   = Convert.ToString(tk.SelectToken("album.id")),
                                album_mid_qq = albumid,
                                albumpic_qq  = $"https://y.gtimg.cn/music/photo_new/T002R300x300M000{albumid}_1.jpg?max_age=2592000",
                                musicid_qq   = Convert.ToString(tk.SelectToken("id")),
                                music_mid_qq = Convert.ToString(tk.SelectToken("mid")),
                                name         = Convert.ToString(tk.SelectToken("name")),
                                time         = TimeConverter.ToMinSecond(Convert.ToInt32(tk.SelectToken("interval")) * 1000),
                                songStatue   = GetMusicSattue(Convert.ToInt32(tk.SelectToken("pay.pay_play")), Convert.ToInt32(tk.SelectToken("pay.pay_down")), Convert.ToInt32(tk.SelectToken("pay.price_track"))),
                                singers      = GetSingers(tk.SelectTokens("singer[*]"))
                            });
                        }
                    }
                    else
                    {
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            Console.WriteLine(JsonConvert.SerializeObject(musics));
            return(musics);
        }
Exemplo n.º 12
0
 public EncodeMethod GetTypeEncoder(Type type)
 {
     EncodeMethod callback = null; typeEncoders.TryGetValue(type, out callback); return(callback);
 }
Exemplo n.º 13
0
 public static void SetDefaultEncoder(EncodeMethod defaultEncoder)
 {
     defaultTypeEncoder = defaultEncoder;
 }
Exemplo n.º 14
0
 public static void SetTypeEncoder(Type type, EncodeMethod encodeFunc)
 {
     typeEncoders[type] = encodeFunc;
 }
Exemplo n.º 15
0
 private WordList analyze(string input, Regex regex, EncodeMethod encodeMethod)
 {
     // analyse
     // retreive all words in the script
     MatchCollection all = regex.Matches(input);
     WordList rtrn;
     rtrn.Sorted = new StringCollection(); // list of words sorted by frequency
     rtrn.Protected = new HybridDictionary(); // dictionary of word->encoding
     rtrn.Encoded = new HybridDictionary(); // instances of "protected" words
     if (all.Count > 0)
     {
         StringCollection unsorted = new StringCollection(); // same list, not sorted
         HybridDictionary Protected = new HybridDictionary(); // "protected" words (dictionary of word->"word")
         HybridDictionary values = new HybridDictionary(); // dictionary of charCode->encoding (eg. 256->ff)
         HybridDictionary count = new HybridDictionary(); // word->count
         int i = all.Count, j = 0;
         string word;
         // count the occurrences - used for sorting later
         do
         {
             word = "$" + all[--i].Value;
             if (count[word] == null)
             {
                 count[word] = 0;
                 unsorted.Add(word);
                 // make a dictionary of all of the protected words in this script
                 //  these are words that might be mistaken for encoding
                 Protected["$" + (values[j] = encodeMethod(j))] = j++;
             }
             // increment the word counter
             count[word] = (int) count[word] + 1;
         } while (i > 0);
         /* prepare to sort the word list, first we must protect
             words that are also used as codes. we assign them a code
             equivalent to the word itself.
            e.g. if "do" falls within our encoding range
                 then we store keywords["do"] = "do";
            this avoids problems when decoding */
         i = unsorted.Count;
         string[] sortedarr = new string[unsorted.Count];
         do
         {
             word = unsorted[--i];
             if (Protected[word] != null)
             {
                 sortedarr[(int) Protected[word]] = word.Substring(1);
                 rtrn.Protected[(int) Protected[word]] = true;
                 count[word] = 0;
             }
         } while (i > 0);
         string[] unsortedarr = new string[unsorted.Count];
         unsorted.CopyTo(unsortedarr, 0);
         // sort the words by frequency
         Array.Sort(unsortedarr, (IComparer) new CountComparer(count));
         j = 0;
         /*because there are "protected" words in the list
           we must add the sorted words around them */
         do
         {
             if (sortedarr[i] == null)
                 sortedarr[i] = unsortedarr[j++].Substring(1);
             rtrn.Encoded[sortedarr[i]] = values[i];
         } while (++i < unsortedarr.Length);
         rtrn.Sorted.AddRange(sortedarr);
     }
     return rtrn;
 }
        private static WordList Analyze(string input, Regex regex, EncodeMethod encodeMethod)
        {
            // analyse
            // retreive all words in the script
            MatchCollection all = regex.Matches(input);
            WordList        rtrn;

            rtrn.Sorted    = new StringCollection(); // list of words sorted by frequency
            rtrn.Protected = new HybridDictionary(); // dictionary of word->encoding
            rtrn.Encoded   = new HybridDictionary(); // instances of "protected" words
            if (all.Count > 0)
            {
                StringCollection unsorted = new StringCollection();  // same list, not sorted
                HybridDictionary Protected = new HybridDictionary(); // "protected" words (dictionary of word->"word")
                HybridDictionary values = new HybridDictionary();    // dictionary of charCode->encoding (eg. 256->ff)
                HybridDictionary count = new HybridDictionary();     // word->count
                int    i = all.Count, j = 0;
                string word;
                // count the occurrences - used for sorting later
                do
                {
                    word = "$" + all[--i].Value;
                    if (count[word] == null)
                    {
                        count[word] = 0;
                        unsorted.Add(word);
                        // make a dictionary of all of the protected words in this script
                        //  these are words that might be mistaken for encoding
                        Protected["$" + (values[j] = encodeMethod(j))] = j++;
                    }
                    // increment the word counter
                    count[word] = (int)count[word] + 1;
                } while (i > 0);

                /* prepare to sort the word list, first we must protect
                 *  words that are also used as codes. we assign them a code
                 *  equivalent to the word itself.
                 * e.g. if "do" falls within our encoding range
                 *      then we store keywords["do"] = "do";
                 * this avoids problems when decoding */
                i = unsorted.Count;
                string[] sortedarr = new string[unsorted.Count];
                do
                {
                    word = unsorted[--i];
                    if (Protected[word] != null)
                    {
                        sortedarr[(int)Protected[word]]      = word.Substring(1);
                        rtrn.Protected[(int)Protected[word]] = true;
                        count[word] = 0;
                    }
                } while (i > 0);
                string[] unsortedarr = new string[unsorted.Count];
                unsorted.CopyTo(unsortedarr, 0);
                // sort the words by frequency
                Array.Sort(unsortedarr, new CountComparer(count));
                j = 0;

                /*because there are "protected" words in the list
                 * we must add the sorted words around them */
                do
                {
                    if (sortedarr[i] == null)
                    {
                        sortedarr[i] = unsortedarr[j++].Substring(1);
                    }
                    rtrn.Encoded[sortedarr[i]] = values[i];
                } while (++i < unsortedarr.Length);
                rtrn.Sorted.AddRange(sortedarr);
            }
            return(rtrn);
        }
        private List <IMusicList> GetMusicList(String userid)
        {
            List <IMusicList> lists = new List <IMusicList>();
            //进个人获得歌单列表
            var result_playlist = HttpMethod.HttpWork(new HttpItem
            {
                URL         = "https://music.163.com/weapi/user/playlist?csrf_token=",
                ContentType = "application/x-www-form-urlencoded; charset=UTF-8",
                Method      = "POST",
                Referer     = "https://music.163.com/",
                UserAgent   = UA,
                Postdata    = Encrypt_Music163.EncryptedRequest(JsonConvert.SerializeObject(new
                {
                    uid        = userid,
                    wordwrap   = "7",
                    offset     = "0",
                    total      = "true",
                    limit      = "36",
                    csrf_token = ""
                })),
            });

            if (result_playlist.StatusCode == System.Net.HttpStatusCode.OK)
            {
                if (JsonConvert.DeserializeObject(result_playlist.Html) is JObject jobj)
                {
                    foreach (var item in jobj.SelectTokens("playlist.[*]"))
                    {
                        int    songcount    = default(int);
                        String musiclist_id = Convert.ToString(item.SelectToken("id"));
                        try
                        {
                            songcount = Convert.ToInt32(item.SelectToken("trackCount"));
                        }
                        catch (Exception)
                        {
                            songcount = default(int);
                        }
                        var musicListType = Convert.ToString(item.SelectToken("creator.userId")).Equals(userid) ? MusicListType.Owner : MusicListType.Collection;
#if DEBUG
                        //调试的时候搜藏歌单不进去了
                        if (musicListType == MusicListType.Collection)
                        {
                            continue;
                        }
#endif
                        IMusicList templist = new MusicList_163
                        {
                            authorname         = Convert.ToString(item.SelectToken("creator.nickname")),
                            avatarUrl          = Convert.ToString(item.SelectToken("creator.avatarUrl")),
                            createtime         = EncodeMethod.GetDateTime(Convert.ToString(item.SelectToken("createTime"))),
                            updatetime         = EncodeMethod.GetDateTime(Convert.ToString(item.SelectToken("updateTime"))),
                            musicListType      = musicListType,
                            musiclist_id       = musiclist_id,
                            name               = Convert.ToString(item.SelectToken("name")),
                            songcount          = Convert.ToString(songcount),
                            musiclist_province = Convert.ToString(item.SelectToken("creator.province")),
                            musiclist_city     = Convert.ToString(item.SelectToken("creator.city")),
                            playtimes          = Convert.ToString(item.SelectToken("playCount")),
                            musics             = GetMusic(musiclist_id, songcount),
                        };
                        Console.WriteLine(templist.name);
                        lists.Add(templist);
                    }
                }
            }
            else
            {
                throw new Exception("爬取歌单列表失败");
            }
            return(lists);
        }