Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include"brynhildr.h"
- #include"html.h"
- void main(){
- Brynhildr br("http://otthts.blog.fc2.com/");//ドメイン(リファラと相対パスに使用)
- br.Access("http://otthts.blog.fc2.com/");//アクセスするページ
- br.Convert();//UTFからSJISに変換
- char *html = br.Get();//文字列を取得
- HTMLParser hp(html);//htmlを解析
- HTMLTag *ht;
- int i = 0;
- char href[0x100];
- do{
- ht = hp.Find("div id=\"rthread\"->a", i++);
- if(ht){
- ht->Get("href", href);
- printf("%s\n%s\n", ht->GetText(), href);
- }
- }while(ht);
- hp.ShowTree();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement