My code is:
self.ip = self.bot.get('https://icanhazip.com').content.rstrip().decode()
I want to replace https://icanhazip.com with https://ipinfo.io, but I don't know how to extract the ip returned:
$ curl "ipinfo.io"
{
"ip": "xx.xx.xx.xx",
"city": "",
"region": "",
"country": "xx",
"loc": "xx.xxx.xx.xxx",
"org": "xxxxxxx Communication Company (Private Joint Stock)"
}