当前位置:   article > 正文

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

抖音播放量接口

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

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

视频搜索接口

  1. def search_video_ios(query, page, sort_type, publish_time, filter_duration, proxies, device):
  2. device = base64.b64decode(device.encode()).decode()
  3. ua = 'AwemeLite 13.4.0 rv:134006 (iPhone; iOS 13.4.1; zh_CN) Cronet'
  4. # 视频搜索
  5. url = f'https://search100-search-quic-lq.amemv.com/aweme/v1/search/item/?' + device
  6. # data = {
  7. # "cursor": page,
  8. # "query": query,
  9. # "count": "10",
  10. # "request_type": "1",
  11. # "search_filter": "1",
  12. # "search_source": "tab_search",
  13. # "search_channel": "homepage_hot",
  14. # "query_correct_type": "1",
  15. # "sort_params": {"filters_select_status": [{"id": "1"}], "sorts_select_status": {"id": "0"}},
  16. # "enter_from": "homepage_hot",
  17. # "ecom_theme": "light",
  18. # "extra": {"recommend_word_id": "", "recommend_word_session_id": ""},
  19. # "shown_count": "0",
  20. # "large_font_mode": "0",
  21. # "search_scene": "douyin_search",
  22. # "address_book_access": "2",
  23. # "location_access": "1",
  24. # "from_group_id": "",
  25. # "is_filter_search": "1",
  26. # "sort_type": sort_type, # 点赞
  27. # "publish_time": publish_time, # 发布时间
  28. # "filter_duration": filter_duration # 分钟
  29. #
  30. # }
  31. # headers = {
  32. # 'Host': 'search100-search-quic-lq.amemv.com',
  33. # 'sdk-version': '2',
  34. # 'passport-sdk-version': '20365',
  35. # 'x-vc-bdturing-sdk-version': '2.2.1.cn',
  36. # 'user-agent': ua,
  37. # }
  38. data = {
  39. "cursor": page,
  40. "keyword": query,
  41. "count": "12",
  42. "type": "1",
  43. "is_pull_refresh": "1",
  44. "hot_search": "0",
  45. "search_source": "switch_tab",
  46. "query_correct_type": "1",
  47. "enter_from": "homepage_hot",
  48. "is_filter_search": "1",
  49. "sort_type": sort_type, # 点赞
  50. "publish_time": publish_time, # 发布时间
  51. "filter_duration": filter_duration # 分钟
  52. }
  53. headers = {
  54. 'passpors-sdk-version': '18',
  55. 'sdk-version': '2',
  56. 'x-ss-dp': '1128',
  57. 'content-type': 'application/x-www-form-urlencoded',
  58. 'user-agent': 'okhttp/3.10.0.1',
  59. }
  60. dy_url, head = ios_xg(url)
  61. headers['x-khronos'] = head['X-Khronos']
  62. headers['x-gorgon'] = head['X-Gorgon']
  63. try:
  64. response = requests.post(dy_url, headers=headers, data=data, timeout=10, proxies=proxies)
  65. return response.text
  66. except Exception as e:
  67. return {'error': str(e)}

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

  1. def aweme_play(aweme_id, proxies, device):
  2. # device = base64.b64decode(device.encode()).decode()
  3. devices = [
  4. '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',
  5. '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',
  6. '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'
  7. ]
  8. url = f'https://api5-normal-c-lq.amemv.com/aweme/v1/aweme/stats/?' + random.choice(devices)
  9. data = {
  10. 'item_id': str(aweme_id),
  11. 'sync_origin': 'false',
  12. 'first_install_time': '-1',
  13. 'pre_item_playtime': '5842',
  14. 'follower_status': '0',
  15. 'hide_mix_entry': 'true',
  16. 'pre_item_id': '0',
  17. 'play_delta': '1',
  18. 'action_time': str(int(time.time())),
  19. 'follow_status': '0',
  20. 'tab_type': '0',
  21. 'aweme_type': '0'
  22. }
  23. headers = {
  24. 'passpors-sdk-version': '18',
  25. 'sdk-version': '2',
  26. 'x-ss-dp': '1128',
  27. 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
  28. 'user-agent': 'AwemeLite 13.4.0 rv:134006 (iPhone; iOS 13.4.1; zh_CN) Cronet',
  29. }
  30. url, head = ios_xg(url)
  31. print(head)
  32. headers['x-khronos'] = head['X-Khronos']
  33. headers['x-gorgon'] = head['X-Gorgon']
  34. try:
  35. resp = requests.post(url, headers=headers, data=data, timeout=10, proxies=proxies)
  36. return resp.text
  37. except Exception as e:
  38. print(e)

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

        

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/357846
推荐阅读
相关标签
  

闽ICP备14008679号