Find direct video link attribute from Twitter video page in Selenium

Viewed 732
1 Answers

Use this API URL format to get the Tweet data:

'https://api.twitter.com/1.1/statuses/show/1234567890.json?tweet_mode=extended';

And as a result, you will receive the following JSON:

  "extended_entities": {
    "media": [
      {
        "video_info": {
          "variants": [
            {
              "content_type": "application/x-mpegURL",
              "url": "https://video.twimg.com/ext_tw_video/1234567890.m3u8"
            },
            {
              "bitrate": 2176000,
              "content_type": "video/mp4",
              "url": "https://video.twimg.com/ext_tw_video/1234567890.mp4"
            },
            {
              "bitrate": 256000,
              "content_type": "video/mp4",
              "url": "https://video.twimg.com/ext_tw_video/1234567890.mp4"
            },
            {
              "bitrate": 832000,
              "content_type": "video/mp4",
              "url": "https://video.twimg.com/ext_tw_video/1234567890.mp4"
            }
          ]
        },
      }
    ]
  },
Related