Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Log log("rakuen.txt");
- void machine(Brynhildr *br, char *url);
- void machinelist(Brynhildr *br, char *url){
- br->Open(url);
- HTMLParser hp(br->Read());
- HTMLTag *ht;
- char href[256];
- int i = 0;
- br->Close();
- while(1){
- ht = hp.Find("div id=\"model_link\"->ul->a", i++);//機種
- if(!ht){
- break;
- }
- //if(!strstr(ht->GetText(), "ジャグラー")){
- ht->Get("href", href);
- printf("%s\n", ht->GetText());
- log.Write(ht->GetText());
- machine(br, href);
- //}
- }
- ht = hp.Find("div class=\"list_navigation\"->div style=\"float:right;\"->a");//次へ
- if(ht){
- ht->Get("href", href);
- return machinelist(br, href);
- }
- }
- void lastgame(Brynhildr *br, char *url){
- br->Open(url);
- HTMLParser hp(br->Read());
- HTMLTag *ht;
- int i = 0;
- br->Close();
- ht = hp.Find("head->title");
- if(ht){
- if(strcmp(ht->GetText(), "エラーページ") == 0){
- Sleep(3000);
- return lastgame(br, url);
- }
- }
- ht = hp.Find("td align=\"right\"", 2);
- if(ht){
- if(!hp.Find("td align=\"right\"", 5)){
- printf("@");
- log.Write("@", false);
- }
- printf("%sg\n", ht->GetText());
- log.Write(ht->GetText(), false);
- log.Write("g");
- }
- else{
- Sleep(500);
- return lastgame(br, url);
- }
- }
- void rireki(Brynhildr *br, char *top){
- br->Open(top);
- HTMLParser hp(br->Read());
- HTMLTag *ht;
- int i = 0;
- char href[256];
- br->Close();
- while(1){
- ht = hp.Find("div class=\"daiban\"", i++);
- if(ht){
- ht = ht->GetParent();//link
- ht->Get("href", href);
- printf("%s:", ht->GetText());
- log.Write(ht->GetText(), false);
- log.Write(":", false);
- Sleep(2000);
- lastgame(br, href);
- }
- else{
- break;
- }
- }
- }
- void machine(Brynhildr *br, char *url){
- br->Open(url);
- HTMLParser hp(br->Read());
- HTMLTag *ht;
- char href[256];
- int i = 0;
- br->Close();
- while(1){
- ht = hp.Find("div id=\"menu_link\"->ul->a", i++);//大当たり履歴データ
- if(!ht){
- break;
- }
- if(ht->GetText() && strstr(ht->GetText(), "大当り履歴データ")){
- ht->Get("href", href);
- rireki(br, href);
- break;
- }
- }
- }
- int main(){
- Brynhildr br("http://www.d-deltanet.com/");
- br.Open("http://www.d-deltanet.com/pc/D0101.do?pmc=22021006");
- HTMLParser hp(br.Read());
- HTMLTag *ht;
- char href[256];
- char *tt;
- int i = 0;
- while(1){
- ht = hp.Find("a", i++);
- if(ht && ht->Get("href", href) && ht->GetText()){
- if(strstr(ht->GetText(), "【20】スロ")){
- break;
- }
- }
- else{
- break;
- }
- }
- br.Close();
- machinelist(&br, href);
- //machine(&br);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement