Модуль json в Python

import json
json_string = '{"ipPort": "208.115.100.162:3128", "protocol": "http", "country": "US", "userAgentSupport": true, "curl": "http://208.115.100.162:3128", "cookiesSupport": true, "postSupport": true, "supportedWebsites": {"bing.com": true, "craigslist.org": true, "pinterest.com": true, "reddit.com": true, "instagram.com": true, "youtube.com": true, "google.com": false, "yandex.com": true, "twitter.com": true, "amazon.com": false, "facebook.com": false, "github.com": true, "ebay.com": false, "linkedin.com": true}, "lastCheckedTimeStamp": "2017-07-22T15:59:26.414169", "httpsSupport": true, "isAnonymous": false, "refererSupport": true, "getSupport": true, "ipAddress": "208.115.100.162", "port": 3128, "speed": 3145.737}'
parsed_string = json.loads(json_string)
print(parsed_string["ipPort"])
# 208.115.100.162:3128

Комментариев нет:

Отправить комментарий