Using a proxy inside of request is actually pretty easy.
You seem to need to have a default after you use the require.
So you say dot defaults and then you pass in curly braces and in here you can pass in a property that
is called proxy.
And in here you can paste in the IP and the port of the proxy.
However, I don't have much luck with it.
So by that I mean finding a proxy that you can use from the Internet because most of the free proxies
that you find they are, well, not that good.
So let's take this one.
It has a last check of two minutes and let's take this one with a lower speed or better speed.
So this one.
So that's the IP.
And then let's.
Take that and then the port.
3128 and let's see if it can actually get the file here.
So here we see a tunneling circuit could not be established.
Host Unreachable error.
That's sort of what the kind of error that I'm always getting when I'm trying to use a proxy in NodeJS
request with the free proxies.
Now there's also paid services, so you can buy proxy list, but I haven't used that myself.
And so you can try that if you have to use proxies for some reason.
However, um, I'm going to present you with better alternatives, I hope then using a proxy.
And basically if you're getting blocked from a site, it means that you have done something that makes
them want to block you.
You've been scraping too aggressively perhaps, and you need to tone it down a bit and not scrape so
fast or so, so much in so little time.
Um.