Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for videos in V2 api #120

Open
JakubDanielczykk opened this issue Jan 11, 2023 · 0 comments
Open

Add support for videos in V2 api #120

JakubDanielczykk opened this issue Jan 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JakubDanielczykk
Copy link

JakubDanielczykk commented Jan 11, 2023

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
There is a way to extract videos from V2 api for quite some time now. They are available under (an example): includes/media/0/variants/0/url.

{
    "includes": {
        "media": [
            {
                "duration_ms": 24854,
                "width": 640,
                "height": 640,
                "variants": [
                    {
                        "bit_rate": 832000,
                        "content_type": "video/mp4",
                        "url": "https://video.twimg.com/amplify_video/1587454126853529602/vid/540x540/xj3M5rCNdkkUGP6x.mp4?tag=14"
                    },
                    {
                        "bit_rate": 1280000,
                        "content_type": "video/mp4",
                        "url": "https://video.twimg.com/amplify_video/1587454126853529602/vid/640x640/pdl6VUCYiN8w98eE.mp4?tag=14"
                    },
                    {
                        "bit_rate": 432000,
                        "content_type": "video/mp4",
                        "url": "https://video.twimg.com/amplify_video/1587454126853529602/vid/320x320/pht7hzEG1BN9o-Bp.mp4?tag=14"
                    },
                    {
                        "content_type": "application/x-mpegURL",
                        "url": "https://video.twimg.com/amplify_video/1587454126853529602/pl/ad4D_5NaCG3_dxV0.m3u8?tag=14&container=fmp4"
                    }
                ],
                "preview_image_url": "https://pbs.twimg.com/amplify_video_thumb/1587454126853529602/img/IaajgbNdWOFo7Igy.jpg",
                "public_metrics": {
                    "view_count": 1141132
                },
                "type": "video",
                "media_key": "13_1587454126853529602"
            }
        ],
    }
}

It would be lovely to be able to play videos on tweet views based on api V2.

@JakubDanielczykk JakubDanielczykk added the enhancement New feature or request label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant