mechanize - Using a python menchanize response as a dict -


when open link mechanize:

r = br.open(url) print(r.read()) 

the returned results like:

[{"name":"name","year":"2000","link":"link"}] 

how can convert response dict can access later. thx in advance.

load json module:

import json   data = json.load(r)   

note don't need call read() explicitly, load() you.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -