There is a code
out = re.findall('window._sharedData = (.*);</script>', list_html) json_decode = json.loads(out[0]) for e in json_decode['entry_data']['ProfilePage'][0]['user']['media']['nodes']: likes = e['likes']['count'] likes = sorted(likes, key=int) print(likes) The code gives an error:
TypeError: 'int' object in not iterable
out- andreymal