what = str("{'id': '4315398315201472005'}")
w = json.loads(what)
print(w["id"]
In [7]: import ast
In [8]: what = "{'id': '4315398315201472005'}"
In [9]: d = ast.literal_eval(what)
In [10]: d
Out[10]: {'id': '4315398315201472005'}
In [11]: d['id']
Out[11]: '4315398315201472005'