TwitterSpaces2Text icon indicating copy to clipboard operation
TwitterSpaces2Text copied to clipboard

KeyError: 'metadata' When Attempting

Open ChrisLally opened this issue 2 years ago • 1 comments

KeyError Traceback (most recent call last) Cell In [118], line 2 1 # %% ----> 2 extractor.getCaption("1YqGopyVqkvJv")

File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/TwitterSpaces2Text/Extractor.py:44, in Extractor.getCaption(self, spaces_id) 42 self.spaces_id = spaces_id 43 self.setGuestToken() ---> 44 self.setMediaKey() 45 self.setChatToken() 46 self.setAccessToken()

File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/TwitterSpaces2Text/Extractor.py:29, in Extractor.setMediaKey(self) 27 data['variables']["withReplays"] = True 28 data['variables']["withScheduledSpaces"] = True ---> 29 self.media_key = requests.get('https://twitter.com/i/api/graphql/jyQ0_DEMZHeoluCgHJ-U5Q/AudioSpaceById', 30 headers={"x-guest-token":self.guest_token,"Authorization":self.bearer_token,'Content-Type':'application/json'}, 31 json=data).json()['data']['audioSpace']['metadata']['media_key']

KeyError: 'metadata'

ChrisLally avatar Nov 11 '22 16:11 ChrisLally

I'm also getting this issue. is there a solution for it? @adwisatya

iamhenry avatar Jan 26 '23 20:01 iamhenry