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()

评论

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.123.4. UTC+08:00, 2024-04-15 11:07
浙ICP备14020137号-1 $访客地图$