I've written a script in vba
in combination with selenium
. The script does it's jobs just fine if I comment out the line I may have wrongly defined for proxy
.
How can I run my scraper using proxy
? I searched a lot but could not find a match that could help me solve this.
This is my try:
Sub UseProxy()
Dim driver As New ChromeDriver, post As Object
With driver
.setProxy "38.131.10.78:53281"
.get "https://stackoverflow.com/questions/tagged/web-scraping"
For Each post In .FindElementsByCss(".question-hyperlink")
R = R + 1: Cells(R, 1) = post.Text
Next post
.Quit
End With
End Sub
If I execute the macro, It throws an error object doesn't support this method ------
.