修改自动获取活动id
This commit is contained in:
parent
7e0b17dde6
commit
bd25e609e5
10
md_ktv.py
10
md_ktv.py
@ -29,7 +29,7 @@ vote_themeId = 133
|
||||
|
||||
|
||||
# 获取活动主题列表
|
||||
def get_themelist():
|
||||
def get_theme_list():
|
||||
global ai_themeId, vote_themeId # 声明全局变量
|
||||
|
||||
data = {
|
||||
@ -38,10 +38,10 @@ def get_themelist():
|
||||
}
|
||||
url = "https://mk-gateway-pro.singworld.cn/mk-outside/api/theme/getThemeListJson"
|
||||
response = requests.post(url, headers=headers, json=data, verify=False)
|
||||
list = json.loads(response.text)['data']['list']
|
||||
theme_list = json.loads(response.text)['data']['list']
|
||||
# 只取前两个活动
|
||||
for i in range(2):
|
||||
theme = list[i]
|
||||
theme = theme_list[i]
|
||||
print('第' + str(i + 1) + '个主题名称:' + theme['themeName'] + ',主题id:' + str(theme['themeId']))
|
||||
if theme['themeType'] == 1:
|
||||
vote_themeId = theme['id']
|
||||
@ -231,8 +231,6 @@ def get_all_mido():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 获取活动主题列表
|
||||
get_themelist()
|
||||
# 遍历所有帐号
|
||||
for i in range(len(md_ktv_cookie)):
|
||||
cookie = md_ktv_cookie[i]
|
||||
@ -260,6 +258,8 @@ if __name__ == '__main__':
|
||||
"accept-language": "zh-CN,zh;q=0.9"
|
||||
}
|
||||
print(f'开始第{i + 1}个帐号签到')
|
||||
# 获取活动主题列表
|
||||
get_theme_list()
|
||||
# 1.签到
|
||||
to_sign()
|
||||
# 2.播放录音15s +2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user