Open ihabpalamino opened 1 year ago
Try this:
`#call the scrap_to_json() method scraper_json = meta_ai.scrap_to_json()
json_data = json.loads(scraper_json)
post_ids = json_data.keys()
posts = []
for id in post_ids: post = json_data[id] post_json = {'id' : id ,'username' : post : post['username'], 'likecount' : post['likecount']} posts.append(post_json)
print(posts)`
the result i get after scraping is this; [{"1766004853797710": {"username": "2M.ma", "shares": 0, "likecount": 101, "replycount": 0, i want to remove the status wich is in this case 1766004853797710 and put it in this way "id_post":1766004853797710 next to username likecount..