Let’s say I have two tweets:
- https://twitter.com/BuzzFeed/status/917922958307295233
- https://twitter.com/BuzzFeed/status/876083996026916865
I want to be able to quickly determine if the tweet contains a video. What is the best way to do that?
I’ve tried using oEmbed API, but it doesn’t give me the information I need. https://dev.twitter.com/web/embedded-timelines/oembed
Posting a temporary answer I have an access to the embedded html of the tweet. Thus, the first tweet example will have the embedded html of:
and second tweet example will have the embedded html of:
I can simply look at the blockquote class name to determine if the twitter is a video or a simple tweet.
This solution, however, will not work if you do not have access to the embedded html of the tweet, thus leaving this question still open for answers.