オークションの最終ページの検出方法を教えてください オークションをCSVで出力するスクリプト プロトタイプ ※とりあえず1500ページ固定で出力している ※実行時間がかかるのはサーバが遅いためなので今のところ対策なし 1.下のソースコードをテキストでセーブ(拡張子はvbs) 2.ieでモンドラにログイン 3.コマンドプロンプトから「cscript 1.のファイル名」でスクリプトを実行 4.1時間ほど待つ 5.c:\temp\action.csvを開く sURL = "http://w001.monsterdragon.jp/auction/index?search_type=1&page=" ' ファイルを保存するフォルダ名 sSaveToFolder = "C:\\temp\\" Set Ie = WScript.CreateObject("InternetExplorer.Application", "IE_") s="" for p=1 to 1500 IE.Navigate sURL & p Do While Ie.Busy = True WScript.Sleep 100 Loop Do While Ie.ReadyState <> 4 WScript.Sleep 100 Loop for td=0 to Ie.Document.all.tags("TD").Length - 1 c=Ie.Document.all.tags("TD")(td).innerHTML if left(c,1) <> "<" then s = s & replace(c,",","") & "," else s = left(s,Len(s)-1) & chr(13) & chr(10) end if next next Set oFS = WScript.CreateObject("Scripting.FileSystemObject") Set oTF = oFS.CreateTextFile(sSaveToFolder & "actions.csv", True) oTF.Write s oTF.Close Set Ie = Nothing WScript.Quit -- 2011-12-17 (Sat) 19:58:54