[Quark Online Disk] Cooperate with the pagoda to achieve automatic check-in and capacity acquisition

First, we need to obtain the following Quark Cookie tutorial:

You need to open the quark network disk in the computer browser, press F12, and select "Network"

After scanning the code to log in, please select sort? pr=ucpro&fr=pc Name file,

And slide down to find that the value corresponding to "cookie" is your cookie

As shown in the figure below

 [Quark Online Disk] Cooperate with the pagoda to achieve automatic check-in and capacity acquisition

Execute PHP file: put the file directly under the domain name, and automatically access the file link every day Sign in

For example: https://Your domain name/sign_task.php

How to use it in pagodas?

Task type: Select "Access URL"
Fill in the task name randomly, and you can know it yourself.
Execution Cycle: select Daily, and hour refers to the hour from which it starts; The minute is the minute of the current hour.
URL address: fill in the address that can directly access the file through the link.
After filling in the "Add Task", you can specify the time to start signing in every day

 [Quark Online Disk] Cooperate with the pagoda to achieve automatic check-in and capacity acquisition

The sign_task.php code is as follows (please note that your quark cookie needs to be filled in the file):

 <? php $cookie="Fill in your cookie"; //View the current check-in status $stateUrl = " https://drive-m.quark.cn/1/clouddrive/capacity/growth/info?pr=ucpro&fr=pc&uc_param_str= "; $stateResponse = @file_get_contents($stateUrl, false, stream_context_create([ 'http' => [ 'header' => "Cookie: $cookie\r\n" ] ])); if ($stateResponse === FALSE) { //Request failed, output error message Echo "The request failed. Please check whether the cookie or network connection is correct.  n"; exit(); } $response = json_decode($stateResponse, true); $sign = $response["data"]["cap_sign"]; if ($sign["sign_daily"]) { $number = $sign["sign_daily_reward"] / (1024 * 1024); $progress = bcdiv($sign["sign_progress"], $sign["sign_target"], 4) * 100; Echo "signed in today to get {$number} MB, progress {$progress}%  n"; exit(); } //Execute sign in $signUrl = " https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign?pr=ucpro&fr=pc&uc_param_str= "; $params = [ "sign_cyclic" => true ]; $options = [ 'http' => [ 'header'  => "Content-Type: application/json\r\n" . "Cookie: $cookie\r\n", 'method'  => 'POST', 'content' => json_encode($params) ] ]; $signResponse = @file_get_contents($signUrl, false, stream_context_create($options)); if ($signResponse === FALSE) { //Request failed, output error message Echo "The sign in request failed. Please check whether the cookie or network connection is correct.  n"; exit(); } $dataResponse = json_decode($signResponse, true); $mb = $dataResponse["data"]["sign_daily_reward"] / 2048; echo json_encode($dataResponse) .  "\n"; Echo "Sign in succeeded, get {$mb} MB!  N"; ?>

Python version

 import requests import json #Replace with your cookie cookie = "" #Add User Agent user_agent = "" #Check the current sign in status state_url = " https://drive-m.quark.cn/1/clouddrive/capacity/growth/info?pr=ucpro&fr=pc&uc_param_str= " headers = { "Cookie": cookie, "User-Agent": user_agent  } try: state_response = requests.get(state_url, headers=headers) State_response. raise_for_status() # Check whether the request is successful except requests. RequestException as e: Print ("The request failed, please check whether the cookie or network connection is correct.") print(e) exit() response = state_response.json() sign = response["data"]["cap_sign"] if sign["sign_daily"]: number = sign["sign_daily_reward"] / (1024 * 1024) progress = (sign["sign_progress"] / sign["sign_target"]) * 100 Print (f "signed in today to get {number}MB , progress {progress}% ") exit() #Execute sign in sign_url = " https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign?pr=ucpro&fr=pc&uc_param_str= " params = { "sign_cyclic": True } headers = { "Content-Type": "application/json", "Cookie": cookie, "User-Agent": user_agent } try: sign_response = requests.post(sign_url, headers=headers, json=params) sign_response.raise_for_status() except requests. RequestException as e: Print ("The sign in request failed, please check whether the cookie or network connection is correct.") print(e) exit() data_response = sign_response.json() mb = data_response["data"]["sign_daily_reward"] / 2048 print(json.dumps(data_response, ensure_ascii=False)) Print (f "Sign in successfully, get {mb}MB ! ")

Original article by Mo Tao, if reproduced, please indicate the source: https://imotao.com/8468.html

fabulous (0)
 Head of Mo Tao Mo Tao
Previous 12:23 am, April 1, 2024
Next 12:00 p.m., April 3, 2024

Related recommendations

Post reply

Your email address will not be disclosed. Required items have been used * tagging

This site uses Akismet to reduce spam comments. Learn how we handle your comment data