帮我写一段取消抖音全部喜欢的Python代码,我的抖音账号是19905027625,密码是xsy666...
时间: 2023-03-08 08:17:45 浏览: 155
Python-源码 自动删除抖音我的喜欢
很高兴为您服务!您需要的Python代码如下:import requestsheaders = {
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'
}username = "19905027625"
password = "xsy666"url = "https://www.douyin.com/aweme/v1/discover/"data = {
'cursor': 0,
'aweme_id': '',
'count': 20
}s = requests.Session()# 登录
login_url = 'https://www.amemv.com/aweme/v1/login/'
data = {
'mobile': username,
'password': password
}
r = s.post(login_url, data=data, headers=headers)# 取消所有喜欢
likes_url = 'https://www.amemv.com/aweme/v1/commit/item/digg/'
data = {
'aweme_id': '',
'type': 2
}
r = s.post(likes_url, data=data, headers=headers)
print('取消所有喜欢成功!')
阅读全文