zl程序教程

您现在的位置是:首页 >  其他

当前栏目

dy评论协议

2023-03-15 22:05:33 时间

文章内容过于简单,个人记录不做太多说明。

源码位置:com.ss.android.ugc.aweme.comment

接口名

类型

链接

conment接口

post

https://aweme.snssdk.com/aweme/v1/comment/publish/?

'''  post_comment  '''
def post_comment(aweme_id,keyword):
    """
    :aweme_id: 视频id
    :param keyword: comment内容
    :return: json
    """
    url = 'https://aweme.snssdk.com/aweme/v1/comment/publish/?ts=1595404303&_rticket=1595404304134&os_api=23&device_platform=android&device_type=MI%205s&iid={你的IID}&version_code=100400&app_name=aweme&openudid={你的OID}&device_id={你的设备Id}&os_version=6.0.1&aid=1128&channel=tengxun_new&ssmix=a&manifest_version_code=100401&dpi=320&cdid={你的CDID}&version_name=10.4.0&resolution=810*1440&language=zh&device_brand=Xiaomi&app_type=normal&ac=wifi&update_version_code=10409900&uuid=008796753821279'
    data = {
        'aweme_id': aweme_id,
        'text': keyword,
        'text_extra': '[]',
        'is_self_see': '0',
        # 'sticker_id':'',
        'sticker_source': '0',
        'sticker_width': '0',
        'sticker_height': '0',
        'channel_id': '0',
        'city': '110000',
        'action_type': '0',
    }

把请求链接修改完成之后,构造headers。 可完成评论请求,需要刷新后才能看到评论效果。

返回结果:

真机效果: