I bust my head but can not sort this out.
numbers, names are fictional. but the idea is like this
I read a link like 'https://graph.facebook.com/123'
this results to source code:
{
"id": "123",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"link": "http://www.facebook.com/people/John-Doe/123",
"gender": "male",
"locale": "en_US"
}
i want to extract all the information of id, name ,etc.
I try this but it fails
link = 'https://graph.facebook.com/123'
result = browser.open(link)
text = result.read()
result.close()
id = re.search('"id": "(.*?)",', cont)
regex '"id": "(.*?)",' seems to be correct, but nothind is returned.. Why???