溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

python怎么實現(xiàn)直播在線觀眾數(shù)據(jù)

發(fā)布時間:2022-03-17 17:34:35 來源:億速云 閱讀:331 作者:iii 欄目:大數(shù)據(jù)

這篇文章主要介紹“python怎么實現(xiàn)直播在線觀眾數(shù)據(jù)”,在日常操作中,相信很多人在python怎么實現(xiàn)直播在線觀眾數(shù)據(jù)問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”python怎么實現(xiàn)直播在線觀眾數(shù)據(jù)”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!

接口:

請求Api

http://主機地址/douyin/liveroom/audience?token=xxx&room_id=6843198199583378191

請求方式

GET

參數(shù)

字段類型說明
tokenstring接口授權(quán)碼
room_idint直播間id

返回示例

{
    "code": 200,
    "data": {
        "data": {
            "currency": "音浪",
            "has_more": false,
            "has_once_live": true,
            "music_wave": "音浪",
            "ranks": [
                {
                    "delta": 0,
                    "first_gift": false,
                    "gap_description": "99",
                    "rank": 1,
                    "score": 99,
                    "user": {
                        "adversary_authorization_info": 0,
                        "adversary_user_status": 0,
                        "allow_be_located": false,
                        "allow_find_by_contacts": false,
                        "allow_others_download_video": false,
                        "allow_others_download_when_sharing_video": false,
                        "allow_share_show_profile": false,
                        "allow_show_in_gossip": false,
                        "allow_show_my_action": false,
                        "allow_strange_comment": false,
                        "allow_unfollower_comment": false,
                        "allow_use_linkmic": false,
                        "authorization_info": 3,
                        "avatar_thumb": {
                            "avg_color": "",
                            "height": 0,
                            "image_type": 0,
                            "is_animated": false,
                            "open_web_url": "",
                            "uri": "100x100/316e3000c72bee4420e2d",
                            "url_list": [
                                "https://cache.yisu.com/upload/information/20210521/347/249404.jpg?from=4010531038",
                                "https://cache.yisu.com/upload/information/20210521/347/249405.jpg?from=4010531038",
                                "https://cache.yisu.com/upload/information/20210521/347/249406.jpg?from=4010531038"
                            ],
                            "width": 0
                        },
                        "badge_image_list": [],
                        "bg_img_url": "",
                        "birthday": 0,
                        "birthday_description": "",
                        "birthday_valid": false,
                        "block_status": 0,
                        "city": "",
                        "comment_restrict": 0,
                        "commerce_webcast_config_ids": [],
                        "constellation": "",
                        "create_time": 0,
                        "disable_ichat": 0,
                        "display_id": "385190430",
                        "enable_ichat_img": 0,
                        "exp": 0,
                        "experience": 0,
                        "fan_ticket_count": 0,
                        "fans_club": {
                            "data": {
                                "anchor_id": 0,
                                "available_gift_ids": [],
                                "badge": {
                                    "icons": {
                                        "0": {
                                            "avg_color": "",
                                            "height": 0,
                                            "image_type": 0,
                                            "is_animated": false,
                                            "open_web_url": "",
                                            "uri": "",
                                            "url_list": [],
                                            "width": 0
                                        }
                                    },
                                    "title": ""
                                },
                                "club_name": "",
                                "level": 0,
                                "user_fans_club_status": 0
                            },
                            "prefer_data": {}
                        },
                        "fold_stranger_chat": false,
                        "follow_info": {
                            "follow_status": 0,
                            "follower_count": 0,
                            "following_count": 0,
                            "push_status": 0
                        },
                        "follow_status": 0,
                        "gender": 0,
                        "hotsoon_verified": false,
                        "hotsoon_verified_reason": "",
                        "ichat_restrict_type": 0,
                        "id": 66287019758,
                        "id_str": "66287019758",
                        "income_share_percent": 0,
                        "is_follower": false,
                        "is_following": false,
                        "level": 0,
                        "link_mic_stats": 0,
                        "media_badge_image_list": [],
                        "modify_time": 0,
                        "need_profile_guide": false,
                        "new_real_time_icons": [],
                        "nickname": "吉森",
                        "pay_grade": {
                            "grade_banner": "",
                            "grade_describe": "距離17級還差3抖幣",
                            "grade_icon_list": [],
                            "level": 16,
                            "name": "",
                            "new_im_icon_with_level": {
                                "avg_color": "",
                                "height": 16,
                                "image_type": 1,
                                "is_animated": false,
                                "open_web_url": "",
                                "uri": "webcast/aweme_honor_level_icon_new_16.png",
                                "url_list": [
                                    "http://p6-webcast-dycdn.byteimg.com/img/webcast/aweme_honor_level_icon_new_16.png~tplv-obj.image",
                                    "http://p9-webcast-dycdn.byteimg.com/img/webcast/aweme_honor_level_icon_new_16.png~tplv-obj.image"
                                ],
                                "width": 32
                            },
                            "new_live_icon": {
                                "avg_color": "",
                                "height": 12,
                                "image_type": 1,
                                "is_animated": false,
                                "open_web_url": "",
                                "uri": "webcast/aweme_pay_grade_2x_15_19.png",
                                "url_list": [
                                    "http://p6-webcast-dycdn.byteimg.com/img/webcast/aweme_pay_grade_2x_15_19.png~tplv-obj.image",
                                    "http://p1-webcast-dycdn.byteimg.com/img/webcast/aweme_pay_grade_2x_15_19.png~tplv-obj.image"
                                ],
                                "width": 12
                            },
                            "next_diamond": 0,
                            "next_name": "",
                            "next_privileges": "",
                            "now_diamond": 0,
                            "pay_diamond_bak": 0,
                            "score": 1697,
                            "screen_chat_type": 0,
                            "this_grade_max_diamond": 1700,
                            "this_grade_min_diamond": 1300,
                            "total_diamond_count": 1697,
                            "upgrade_need_consume": 0
                        },
                        "pay_score": 0,
                        "pay_scores": 0,
                        "push_comment_status": false,
                        "push_digg": false,
                        "push_follow": false,
                        "push_friend_action": false,
                        "push_ichat": false,
                        "push_status": false,
                        "push_video_post": false,
                        "push_video_recommend": false,
                        "real_time_icons": [],
                        "sec_uid": "MS4wLjABAAAABkK4jcEax0iVyUVnrSH3Q63wM6vRb_OlpK0Zd9DbcwE",
                        "secret": 0,
                        "share_qrcode_uri": "",
                        "short_id": 385190430,
                        "signature": "",
                        "special_id": "",
                        "status": 0,
                        "telephone": "",
                        "ticket_count": 0,
                        "top_fans": [],
                        "top_vip_no": 0,
                        "total_recharge_diamond_count": 0,
                        "user_role": 0,
                        "verified": false,
                        "verified_content": "",
                        "verified_mobile": false,
                        "verified_reason": "",
                        "with_car_management_permission": false,
                        "with_commerce_permission": false,
                        "with_fusion_shop_entry": false
                    }
                },
            ],
            "rules_url": "sslocal://webcast_webview?url=https%3A%2F%2Faweme.snssdk.com%2Fmagic%2Fpage%2Fejs%2F5f27c6ca9950ec0307de9248%3FappType%3Ddouyin%26pull_down_indicator_color%3Ddark%26pull_down_indicator_not_show%3D0%26web_bg_color%3D%2523ffffffff&pull_down_close=0&pull_down_indicator_not_show=1&pull_down_indicator_color=dark&type=popup&gravity=bottom&height=450&radius=8&hide_more=0&hide_nav_bar=0&hide_status_bar=0&landscape_custom_width=1&rate_height=450",
            "seats": [],
            "self_info": {
                "delta": 0,
                "first_gift": false,
                "gap_description": "本場貢獻:0音浪",
                "rank": 0,
                "score": 0
            },
            "total": 0
        },
        "extra": {
            "now": 1600957337628
        },
        "status_code": 0
    },
    "msg": "success"
}

到此,關于“python怎么實現(xiàn)直播在線觀眾數(shù)據(jù)”的學習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關知識,請繼續(xù)關注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI