#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import pycurl
from io import BytesIO

buf = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://ip.cip.cc')
c.setopt(c.WRITEDATA, buf)
#c.setopt(c.VERBOSE, True)
c.setopt(c.USERAGENT, 'libcurl')
c.perform()
c.close()

print(buf.getvalue().decode('utf-8').strip())

36a143212af3a9e1de2d191564293e6fc888bd36
<mask token>

<mask token>
c.setopt(c.URL, 'http://ip.cip.cc')
c.setopt(c.WRITEDATA, buf)
c.setopt(c.USERAGENT, 'libcurl')
c.perform()
c.close()
print(buf.getvalue().decode('utf-8').strip())

<mask token>
buf = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://ip.cip.cc')
c.setopt(c.WRITEDATA, buf)
c.setopt(c.USERAGENT, 'libcurl')
c.perform()
c.close()
print(buf.getvalue().decode('utf-8').strip())

import pycurl
from io import BytesIO
buf = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://ip.cip.cc')
c.setopt(c.WRITEDATA, buf)
c.setopt(c.USERAGENT, 'libcurl')
c.perform()
c.close()
print(buf.getvalue().decode('utf-8').strip())

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import pycurl
from io import BytesIO

buf = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://ip.cip.cc')
c.setopt(c.WRITEDATA, buf)
#c.setopt(c.VERBOSE, True)
c.setopt(c.USERAGENT, 'libcurl')
c.perform()
c.close()

print(buf.getvalue().decode('utf-8').strip())
