Getting the VOD timestamp from a clip

Is it possible to get the timestamp of the VOD from a clip?

There was a solution on a previous discussion but it no longer seems to work. Clip Event Timestamp

Works fine for me.

And I wrote what you linked to

Both the created_at timestamp is present as is the vod.offset keys (in the v5 output)

It didn’t work for me when I tried, unless I’m making a mistake somewhere

def clip(self):
    url = ''
    clip_id = re.sub(r'', '', url)
    clip_data = requests.get('' + clip_id, headers=self.headers).json()
    clip_data2 = requests.get('' + clip_id, headers=self.headers).json()
    print(clip_data, '\n')


{'data': [{'id': 'SpikyDelightfulDiscSSSsss', 'url': '', 'embed_url': '', 'broadcaster_id': '136765278', 'broadcaster_name': 'buddha', 'creator_id': '140875512', 'creator_name': 'yumbananas', 'video_id': '450418682', 'game_id': '32982', 'language': 'en', 'title': 'Curtis Hotmic', 'view_count': 6279, 'created_at': '2019-07-09T21:54:17Z', 'thumbnail_url': ''}], 'pagination': {}} 

{'error': 'Not Found', 'status': 404, 'message': ''}

The 404 from the kraken endpoint is likely because you’re not specifying v5 when making the request, and so your request is defaulting to v3 (which doesn’t have that clips endpoint, hence the 404).

Add the Accept: application/vnd.twitchtv.v5+json header for that kraken request you’re making so that it’ll use v5 and correctly return data for the clip.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.