0

Let’s say I have two tweets:

  1. https://twitter.com/BuzzFeed/status/917922958307295233
  2. 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

byInduction
  • 405
  • 1
  • 6
  • 13

2 Answers2

0

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:

<blockquote class=\"twitter-tweet\" data-lang=\"en\"><a href=\"https://twitter.com/BuzzFeed/status/917922958307295233?ref_src=twsrc%5Etfw\" /></blockquote>

and second tweet example will have the embedded html of:

<blockquote class=\"twitter-video\" data-lang=\"en\"><a href=\"https://twitter.com/BuzzFeed/status/876083996026916865?ref_src=twsrc%5Etfw\" /></blockquote>

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.

byInduction
  • 405
  • 1
  • 6
  • 13
0

You can use the filter:videos advanced search operator in Twitter search to filter out only tweets containing videos like from:BuzzFeed filter:videos for example. Such filter can be coupled with other filters and/or Boolean arguments to make sure you narrow the search to only the tweets you wish to verify.

Elad Ratson
  • 706
  • 1
  • 7
  • 23