youlan 2021-10-25 14:28:57

掘金签到脚本

import requests,json
from apscheduler.schedulers.blocking import BlockingScheduler
from datetime import datetime
 
url = 'https://api.juejin.cn/growth_api/v1/check_in'
# 签到的接口能看到这些信息
data = {
	'aid':'你的aid',
	'uuid':'你的uuid', 
	'_signature': '你的_signature'}

header = {
	"cookie": '你的cookie'
}

# 请求签到接口
def SignIn():
	r =requests.post(url,data, headers = header)
	print(r.text)

# 输出
def job():
    print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
    SignIn()


if __name__ == "__main__":
	# 每天早上六点半签到
	scheduler = BlockingScheduler()
	scheduler.add_job(job, 'cron', day_of_week='0-6', hour=6, minute=30)
	scheduler.start()

评论

Главная - Вики-сайт
Copyright © 2011-2024 iteam. Current version is 2.139.0. UTC+08:00, 2024-12-25 15:55
浙ICP备14020137号-1 $Гость$