Pak Mariman
New Member
- Joined
- Jan 15, 2017
- Messages
- 21
Trying my hand at web-scraping again. I want to grab a specific text from a website, and to do so the first part of my code dumps the website's response into a cell of the worksheet.
Here is the code:
In the returned text, the information, e.g. the text of the abstract, is not there.
Why? What am I doing wrong?
Here is the code:
Code:
Sub Test()
Dim URL As String
Dim HTTPObject, HTMLObject As Object
URL = "https://worldwide.espacenet.com/publicationDetails/biblio?DB=EPODOC&II=0&ND=3&adjacent=true&locale=en_EP&FT=D&date=20190709&CC=KR&NR=20190082024A&KC=A#"
Set HTTPObject = CreateObject("MSXML2.ServerXMLHTTP")
HTTPObject.Open "GET", URL, False
HTTPObject.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
HTTPObject.send
Set HTMLObject = CreateObject("htmlfile")
With HTMLObject
.Open
.Write HTTPObject.responseText
.Close
End With
Cells(1, 1) = HTTPObject.responseText
In the returned text, the information, e.g. the text of the abstract, is not there.
Why? What am I doing wrong?