YasserKhalil
Well-Known Member
Hello everyone
I have tried this code for scraping Status
It worked well for me when testing with just one or two links
But when trying to deal with about 200 links in the same way I got nothing .. and when navigating manually I noticed that my IP has been banned
How can I deal with that issue?
Here's an example link
https://register.epo.org/application?number=EP10156846
I have tried this code for scraping Status
Code:
Sub Scrape_Status()
Dim ws As Worksheet
Dim v As Variant
Dim s As String
Dim r As Long
Set ws = ThisWorkbook.Worksheets("Test Set")
For r = 3 To ws.Cells(Rows.Count, 2).End(xlUp).Row
With CreateObject("WinHttp.WinHttpRequest.5.1")
.Open "GET", "https://register.epo.org/application?number=" & ws.Cells(r, 2).Text, False
.setRequestHeader "DNT", "1"
On Error Resume Next
.send
If .Status = 200 Then
v = Split(.responseText, "Status</td>")
s = Split(v(1), "<br/>")(0)
s = Trim(Mid(s, InStr(s, ">") + 1))
ws.Cells(r, 4).Value = s
End If
On Error GoTo 0
End With
Next r
End Sub
It worked well for me when testing with just one or two links
But when trying to deal with about 200 links in the same way I got nothing .. and when navigating manually I noticed that my IP has been banned
How can I deal with that issue?
Here's an example link
https://register.epo.org/application?number=EP10156846