1

I'm trying to verify if a site changes as the position of who accesses the site changes. So i thought to access the site using different IP addresses but i don't know to do it practically. All i was able to learn is that using packages httr and rvest i can simulate a session using a different IP than mine, trough command:

html_session("https://whatismyipaddress.com/",use_proxy("185.82.212.95", 8080))

I'm not sure that is really usefull for my purpose, as i don't know how to use it. The proxy and the port were taken from https://free-proxy-list.net/

The following step would be to take a screen-shot of the web pages, as i know that often scraping isn't permitted and i'm satisfied of a "qualitative" analysis. I know I can take screenshots using webshot package:

webshot(url="https://whatismyipaddress.com/",file="C:/Users/.../screen.png", zoom=4 )

So how can i do to make webshot has screenshots of webpages opened using "fake" IP?

Thank you!

  • You can configure [Rstudio to use a proxy](https://support.rstudio.com/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-or-HTTPS-Proxy) so all requests should go through that proxy server. But you can't really just "fake" an IP address. You can just "borrow" the IP of the proxy server. – MrFlick Feb 13 '18 at 18:28
  • Of course i can only borrow IP addresses, I used a wrong expression! However i tryied to follow the instructions of [Rstudio to use a proxy](https://support.rstudio.com/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-or-HTTPS-Proxy): I created .Renviron file and configured as in example, also i deselected **Use Internet Explorer library/proxy for HTTP** option in the global enviroment menu (as suggested [here](https://stackoverflow.com/questions/6467277/proxy-setting-for-r) ), i restarted R, and then i took a new screenshot but my IP seems to remain the same as before.. Any ideas? – Francesco Dal Pont Feb 14 '18 at 10:41

0 Answers0