抖音视频播放量 视频搜索接口算法 XG XK 算法 设备注册

最近应客户要求研究了下抖音搜索视频和播放视频的接口 现在已做完 放出部分接口给大家参考下

注:全套需要配合抖音设备使用

视频搜索接口

def search_video_ios(query, page, sort_type, publish_time, filter_duration, proxies, device):


    device = base64.b64decode(device.encode()).decode()
    ua = 'AwemeLite 13.4.0 rv:134006 (iPhone; iOS 13.4.1; zh_CN) Cronet'

    # 视频搜索
    url = f'https://search100-search-quic-lq.amemv.com/aweme/v1/search/item/?' + device

    # data = {
    #     "cursor": page,
    #     "query": query,
    #     "count": "10",
    #     "request_type": "1",
    #     "search_filter": "1",
    #     "search_source": "tab_search",
    #     "search_channel": "homepage_hot",
    #     "query_correct_type": "1",
    #     "sort_params": {"filters_select_status": [{"id": "1"}], "sorts_select_status": {"id": "0"}},
    #     "enter_from": "homepage_hot",
    #     "ecom_theme": "light",
    #     "extra": {"recommend_word_id": "", "recommend_word_session_id": ""},
    #     "shown_count": "0",
    #     "large_font_mode": "0",
    #     "search_scene": "douyin_search",
    #     "address_book_access": "2",
    #     "location_access": "1",
    #     "from_group_id": "",
    #     "is_filter_search": "1",
    #     "sort_type": sort_type,  # 点赞
    #     "publish_time": publish_time,  # 发布时间
    #     "filter_duration": filter_duration  # 分钟
    #
    # }
    # headers = {
    #     'Host': 'search100-search-quic-lq.amemv.com',
    #     'sdk-version': '2',
    #     'passport-sdk-version': '20365',
    #     'x-vc-bdturing-sdk-version': '2.2.1.cn',
    #     'user-agent': ua,
    # }

    data = {
        "cursor": page,
        "keyword": query,
        "count": "12",
        "type": "1",
        "is_pull_refresh": "1",
        "hot_search": "0",
        "search_source": "switch_tab",
        "query_correct_type": "1",
        "enter_from": "homepage_hot",
        "is_filter_search": "1",
        "sort_type": sort_type,  # 点赞
        "publish_time": publish_time,  # 发布时间
        "filter_duration": filter_duration  # 分钟
    }
    headers = {
        'passpors-sdk-version': '18',
        'sdk-version': '2',
        'x-ss-dp': '1128',
        'content-type': 'application/x-www-form-urlencoded',
        'user-agent': 'okhttp/3.10.0.1',
    }




    dy_url, head = ios_xg(url)
    headers['x-khronos'] = head['X-Khronos']
    headers['x-gorgon'] = head['X-Gorgon']

    try:
        response = requests.post(dy_url, headers=headers, data=data, timeout=10, proxies=proxies)
        return response.text
    except Exception as e:
        return {'error': str(e)}

视频播放接口 (用来刷视频播放量)

def aweme_play(aweme_id, proxies, device):

    # device = base64.b64decode(device.encode()).decode()
    devices = [
    'version_code=21.5.0&js_sdk_version=2.19.0.2&tma_jssdk_version=2.19.0.2&app_name=aweme&app_version=21.5.0&vid=6EB9D4AF-1023-4511-9444-43CCC51FDD98&device_id=3180200537102317&channel=App%20Store&mcc_mnc=&aid=1128&screen_width=750&openudid=ed46899ac2ceb180fc96af58602f052ae1775db7&cdid=5AECBE65-90A2-4BC3-913C-52781B107ECA&os_api=29&ac=WIFI&os_version=13.4.1&device_platform=iphone&build_number=215013&is_vcd=1&device_type=iPhone9%2C1&iid=3848703607319037&idfa=B98B3FD7-D88E-4858-85D1-F3FA16247911',
    'version_code=21.5.0&js_sdk_version=2.19.0.2&tma_jssdk_version=2.19.0.2&app_name=aweme&app_version=21.5.0&vid=78118F80-4D68-4534-BB1B-6A7EE4F694CD&device_id=1808010026166333&channel=App%20Store&mcc_mnc=&aid=1128&screen_width=750&openudid=f4b4152e5b6649b247cff86b1c979560f0b0b52a&cdid=5F67CD1B-6C35-4631-BF03-B8B6112E7693&os_api=29&ac=WIFI&os_version=13.4.1&device_platform=iphone&build_number=215013&is_vcd=1&device_type=iPhone9%2C1&iid=2705211513650231&idfa=8EAC02A7-5AD8-4EE3-8133-8B2CF9143B84',
    'version_code=21.5.0&js_sdk_version=2.19.0.2&tma_jssdk_version=2.19.0.2&app_name=aweme&app_version=21.5.0&vid=A6B26E93-34D4-4F5B-9C52-489292AACF8E&device_id=4200547327938622&channel=App%20Store&mcc_mnc=&aid=1128&screen_width=750&openudid=aa4e166fc3bfd8a3a6d2ecb4161edb89c9dbea12&cdid=A25EA79B-3E54-4E93-A91D-2B7343014FEE&os_api=29&ac=WIFI&os_version=13.4.1&device_platform=iphone&build_number=215013&is_vcd=1&device_type=iPhone9%2C1&iid=3760742677101288&idfa=B407546C-C3E8-4329-97DA-9D94C9A22EBC'
               ]

    url = f'https://api5-normal-c-lq.amemv.com/aweme/v1/aweme/stats/?' + random.choice(devices)
    data = {
            'item_id': str(aweme_id),
            'sync_origin': 'false',
            'first_install_time': '-1',
            'pre_item_playtime': '5842',
            'follower_status': '0',
            'hide_mix_entry': 'true',
            'pre_item_id': '0',
            'play_delta': '1',
            'action_time': str(int(time.time())),
            'follow_status': '0',
            'tab_type': '0',
            'aweme_type': '0'
        }

    headers = {
        'passpors-sdk-version': '18',
        'sdk-version': '2',
        'x-ss-dp': '1128',
        'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
        'user-agent': 'AwemeLite 13.4.0 rv:134006 (iPhone; iOS 13.4.1; zh_CN) Cronet',
    }
    url, head = ios_xg(url)
    print(head)
    headers['x-khronos'] = head['X-Khronos']
    headers['x-gorgon'] = head['X-Gorgon']
    try:
        resp = requests.post(url, headers=headers, data=data, timeout=10, proxies=proxies)
        return resp.text
    except Exception as e:
        print(e)

目前测试效果还是很好 用配套附带的设备注册接口 可以做到无账号无限制采集刷量

        

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值