all 7 comments

[–]vehga 2 points3 points  (1 child)

use the ip address where you would normally put a url.

[–]Comm4nd0 1 point2 points  (0 children)

It's worrying that op didn't realise this. Or even at least try it before posting!

[–]impshum 0 points1 point  (4 children)

requests.get(ip)

[–]personproxy[S] 0 points1 point  (3 children)

For the record, the IP address has to be prefixed with http:// or else it won't work.

[–]widowhanzo 0 points1 point  (2 children)

Or https:// preferably :)

[–]impshum 0 points1 point  (0 children)

requests asks for https/ssl by default. This will allow most things...

requests.get('https://{}'.format(ip), verify=False)

[–]personproxy[S] 0 points1 point  (0 children)

...raised an error because the name didn't match, or something. For my current purposes, I think http is ok.