script = soup.find('script', text=re.compile('window\\.blog\\.data'))
json_text = re.search('^\\s*window\\.blog\\.data\\s*=\\s*({.*?})\\s*;\\s*$',
    script.string, flags=re.DOTALL | re.MULTILINE).group(1)
data = json.loads(json_text)
assert data['activity']['type'] == 'read'
How to extract a JSON object that was defined in a HTML page javascript block using Python?