Exemplo n.º 1
0
        public string Parse(string html)
        {
            var utf8html = ParserUtility.EncodeEuc2Utf8(html);

            var parser   = new HtmlParser();
            var document = parser.Parse(utf8html);

            var node = document
                       .QuerySelectorAll("input")
                       .Single(x => x.GetAttribute("name") == "post_key");

            return(node.GetAttribute("value"));
        }
Exemplo n.º 2
0
        public IEnumerable <VoiceModel> Parse(string html)
        {
            var utf8html = ParserUtility.EncodeEuc2Utf8(html);

            var parser   = new HtmlParser();
            var document = parser.Parse(utf8html);

            var listAreaNode = document.QuerySelectorAll("ul")
                               .Single(x => x.ClassName == "listArea");

            var archiveNodes = listAreaNode
                               .QuerySelectorAll("li")
                               .Where(x => x.ClassName == "archive");

            return(archiveNodes.Select(x => ParseArchiveNode(x)));
        }