public albumInfo extractAlbumInfo(string albumUrl)
        {
            string respHtml = "";
            albumInfo albumInfo = new albumInfo();
            albumInfo.url = albumUrl;

            respHtml = crl.getUrlRespHtml(albumUrl, stHtmlCharset);

            //http://www.songtaste.com/album/570665
            //<h1 class="h1user">嘟藥婞麸</h1>
            //<p class="mid_tit">文文收藏 聆听纯音<p>

            //http://www.songtaste.com/album/481886
            //<h1 class="h1user">//+Tu.Ren"娜蒂亚"</h1>
            //<p class="mid_tit">娜蒂亚回归ST赞歌<p>

            string mid_tit;
            if (crl.extractSingleStr(@"<p\s+?class=""mid_tit"">(?<mid_tit>.+?)<p>", respHtml, out mid_tit))
            {
                albumInfo.name = crl.removeInvChrInPath(mid_tit);
            }

            string h1user;
            if (crl.extractSingleStr(@"<h1\s+?class=""h1user"">(?<h1user>.+?)</h1>", respHtml, out h1user))
            {
                albumInfo.author = crl.removeInvChrInPath(h1user);
            }

            return albumInfo;
        }
Пример #2
0
        public albumInfo extractAlbumInfo(string albumUrl)
        {
            string    respHtml  = "";
            albumInfo albumInfo = new albumInfo();

            albumInfo.url = albumUrl;

            respHtml = crl.getUrlRespHtml(albumUrl, stHtmlCharset);

            //http://www.songtaste.com/album/570665
            //<h1 class="h1user">嘟藥婞麸</h1>
            //<p class="mid_tit">文文收藏 聆听纯音<p>

            //http://www.songtaste.com/album/481886
            //<h1 class="h1user">//+Tu.Ren"娜蒂亚"</h1>
            //<p class="mid_tit">娜蒂亚回归ST赞歌<p>

            string mid_tit;

            if (crl.extractSingleStr(@"<p\s+?class=""mid_tit"">(?<mid_tit>.+?)<p>", respHtml, out mid_tit))
            {
                albumInfo.name = crl.removeInvChrInPath(mid_tit);
            }

            string h1user;

            if (crl.extractSingleStr(@"<h1\s+?class=""h1user"">(?<h1user>.+?)</h1>", respHtml, out h1user))
            {
                albumInfo.author = crl.removeInvChrInPath(h1user);
            }

            return(albumInfo);
        }