日本は何故、反省しないのか?

Yahoo! Japan 掲示板トピックビューアー

[ << 最初のページ | < 前のページ | メッセージリスト | 掲示板表示 | [ メッセージ # ] | 次のページ > | 最後のページ >> ]

できたぞ!>イニ

投稿者: pup_pooh_one 投稿日時: 2005/04/26 08:38 投稿番号: [47177 / 60270]
/**
* うそつきイニの投稿を全部保存できるソフト
* 作成日: 2005/04/25
* @author pup_pooh_one
*/

import java.io.*;
import java.net.*;

public class Inishieni {
public static void main(String[] args) {

int messageNo = 0;
int words = args.length - 1;
String searchURL = "";
String nextURL = "";
String baseURL = "";
String yahoo = "http://messages.yahoo.co.jp";
String nextMessage = "次のメッセージ ";
String message = "メッセージ: ";

baseURL = args[0];

System.out.println("Inishieni ver.0.3");
searchURL = args[0];
for (int i = 0; i < args.length; i++)
System.out.println(args[i]);
System.out.println("");

do {
String line = "";
int retry = 3;
try {
boolean isExist[] = new boolean[words];
for (int i = 0; i < words; i++) {
isExist[i] = false;
}
messageNo = 0;

URL url = new URL(searchURL);
InputStreamReader isr = new InputStreamReader( url.openStream(),"EUC-JP");
BufferedReader reader = new BufferedReader(isr);
while ((line = reader.readLine()) != null) {
int index = line.indexOf(message);
if (messageNo == 0 && index >= 0) {
messageNo = getMessageNo(line, index+message.length());
}

index = line.indexOf (nextMessage);
if (index >= 0) {
nextURL = getNextURL(line);
}

if (nextURL != "" && messageNo > 0 && line.indexOf ("掲示板検索: ") >= 0) {
break;
}

for (int j = 0; j < words; j++) {
if (line.indexOf (args[j+1]) >= 0) {
isExist[j] = true;
}
}
}
int count = 0;
for (int j = 0; j < words; j++) {
if (isExist[j] == true) {
count ++;
}
}
if (count == words) {
System.out.println("メッセージ:"+messageNo);
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream( messageNo+".html"), "SHIFT-JIS");
char buffer[] = new char[1024];
int size;
while((size = isr.read(buffer)) != -1) {
[ << 最初のページ | < 前のページ | メッセージリスト | 掲示板表示 | [ メッセージ # ] | 次のページ > | 最後のページ >> ]

Yahoo! Japan 掲示板 アーカイヴ

[検索ページ] (中東) (東亜) (捕鯨 / 捕鯨詳細)