Const adTypeBinary = 1 Const adTypeText = 2 Const adSaveCreateNotExists = 1 Const adSaveCreateOverWrite = 2 Dim objHTTP, objStream 'url = "https://info.jpexpress.jp/confirm/confirmList.html?denpyoNo=491050290010" 'url = "http://www.post.japanpost.jp/cgi-zip/zipcode.php?pref=46&city=1462010&cmp=1" url = "http://www.post.japanpost.jp/cgi-zip/zipcode.php?pref=46&city=1462010&cmp=1&mode=list&addr=" txt = "l:\response.txt" csv = "l:\output.csv" Set objHTTP = WScript.CreateObject("MSXML2.XMLHTTP") Set objStream = WScript.CreateObject("ADODB.Stream") objStream.Open Call objHTTP.Open("GET", url, FALSE) objHTTP.Send (Null) If objHTTP.Status = 200 Then objStream.Type = adTypeBinary objStream.Write objHTTP.ResponseBody Else Error = "Error Status : " & objHTTP.Status & _ vbCrLf & _ "Error StatusText : " & objHTTP.StatusText objStream.Type = adTypeText objStream.writeText Error End If objStream.SaveToFile txt, adSaveCreateOverwrite objStream.Close Set Src = CreateObject("ADODB.Stream") Src.Open Src.Type = adTypeText 'Src.Charset = "_autodetect_all" Src.Charset = "UTF-8" Src.LoadFromFile txt Set Dst = CreateObject("ADODB.Stream") Dst.Open Dst.Type = adTypeText Dst.Charset = "Shift_JIS" Src.CopyTo Dst Src.Close Dst.SaveToFile txt, adSaveCreateOverWrite Dst.Close Dim fs Set fs = WScript.CreateObject("Scripting.FileSystemObject") Set i = fs.OpenTextFile(txt) Set o = fs.OpenTextFile(csv, 2, True) strAll = i.ReadAll i.Close strAll = Replace (strAll,vbCrLf,"") strAll = Replace (strAll,vbLf,"") strAll = Replace (strAll,vbCr,"") strAll = Replace (strAll,vbTab,"") Dim RegExp Set RegExp = CreateObject("VBScript.RegExp") RegExp.IgnoreCase = True RegExp.Global = True RegExp.Pattern = ".*?" Set Matches1 = RegExp.Execute(strAll) For Each Match1 in Matches1 RegExp.Pattern = ".*?" Set Matches2 = RegExp.Execute(Match1.Value) For Each Match2 in Matches2 RegExp.Pattern = "<(td|th).*?>.*?" Set Matches3 = RegExp.Execute(Match2.Value) For Each Match3 in Matches3 RegExp.Pattern = "<.*?>| ?" str = str & RegExp.Replace(Match3.Value,"") & "," Next str = str & vbCrLf Next Next o.Write str o.Close