示例#1
0
        public async Task <IEnumerable <VoiceModel> > GetRecentVoicesAsync()
        {
            var url  = new Uri(@"http://mixi.jp/recent_voice.pl");
            var html = await httpClient.GetStringAsync(url);

            var parser = new RecentVoicesParser();

            return(parser.Parse(html));
        }
        public void ParseTest()
        {
            // ログイン完了後の「http://mixi.jp/recent_voice.pl」をダウンロードしてhtmlディレクトリに配置してから実行する
            var bytes   = File.ReadAllBytes("html/recent_voice.html");
            var eucHtml = ParserUtility.ByteArray2Euc(bytes);

            var parser = new RecentVoicesParser();

            parser.Parse(eucHtml).IsNotEmpty();
        }