#!/usr/bin/env python
# -*- coding: UTF-8 -*-

from __future__ import unicode_literals
from __future__ import print_function
from gi.repository import GLib, Gio


if __name__ == '__main__':
    update_url = 'https://extensions.gnome.org/update-info/'
    proxies = Gio.ProxyResolver.get_default().lookup(update_url)

    if proxies is not None:
        print("Detected proxy: %s" % proxies[0])
        print("All proxies: %s" % proxies)
    else:
        print("ProxyResolver did not returned any proxy")
