Python解析Json字符串

2024-06-11阅读数:30
# coding=utf-8
import json

if __name__ == '__main__':
    json_str = '{"website":"Spiderbuf",    "url":"http://www.spiderbuf.cn","description":"Python爬虫练习网站"}'
    json_obj = json.loads(json_str)
    print(json_obj['website'])