첫번째 방법
Sub 검색()
'winhttp5.1 참조 안함
Set WinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
Set doc = CreateObject("htmlfile")
주소 = "주소입력"
WinHttp.Open "GET", 주소, FALSE
WinHttp.Send
doc.body.innerhtml = WinHttp.ResponseText
.......
end sub
두번째 방법
Sub 모든종목가져오기()
'winhttp 5.1 참조함
Dim winhttp As New WinHttpRequest
주소 = " 주소입력"
winhttp.Open "GET", 주소
winhttp.send
결과 = winhttp.responseText
Set json = JsonConverter.ParseJson(결과) 'jsonconverter 있어야함
......
end sub
--------------------
Function getDocument(text)
Set getDocument = CreateObject("htmlfile")
getDocument.body.innerHtml = text
End Function
'크롤링_crawling' 카테고리의 다른 글
크롤링 Json (0) | 2023.04.18 |
---|---|
크롤링 FUNCTION (0) | 2023.04.18 |
selenium 엔카 크롤링 (bot 감지 실행 안됨) (0) | 2023.04.01 |
selenium 셀레니움 기본 크롬오픈 최소화 (0) | 2023.04.01 |
셀레니움 selenium 오류 -2147217392(80041010) 런타임 자동화 오류 (0) | 2023.03.31 |