利用WPS实现【夸克网盘】全自动签到获取永久容量

之前分享过利用WPS的AirScript实现【阿里云盘的全自动签到】,今天再来分享一下【夸克网盘】全自动签到获取永久容量的方法。

 

准备工作,先来获取夸克Cookie,教程如下:

1.电脑浏览器打开夸克网盘,先不登录的情况下 按 F12 ,选择“网络”,如图所示:

利用WPS实现【夸克网盘】全自动签到获取永久容量插图3羊毛日报

扫码登录后,请选择”sort?pr=ucpro&fr=pc“名称文件,并下滑找到”Cookie“所对应的值就是你的Cookie,如下图所示。

利用WPS实现【夸克网盘】全自动签到获取永久容量插图4羊毛日报

 

如果你需要复用之前阿里云盘签到配置的推送,可以直接在之前创建的表格中新建一个名为 夸克网盘 的工作表。再把新建一个脚本粘贴下方的代码,再把获取到的夸克网盘Cookie 放在 A 列即可,支持多账号,一行一个。

源码开源地址:https://registry.npmmirror.com/@asunajs/dist/0.0.3/files/quark.wps.js

 

完整代码如下:

 

  1. // ../../core/quark/api.ts
  2. function createApi(http) {
  3. let driveUrl = “https://drive-m.quark.cn/1/clouddrive/capacity/growth”;
  4. return {
  5. getInfo: function() {
  6. return http.get(`${driveUrl}/info?pr=ucpro&fr=pc&uc_param_str=`);
  7. },
  8. sign: function() {
  9. return http.post(`${driveUrl}/sign?pr=ucpro&fr=pc&uc_param_str=`, {
  10. sign_cyclic: !0
  11. });
  12. }
  13. };
  14. }
  15. // ../../core/quark/index.ts
  16. function getInfo($) {
  17. try {
  18. let { data, code, status, message } = $.api.getInfo();
  19. if (code !== 0) {
  20. $.logger.info(“获取用户信息失败”, code, status, message);
  21. return;
  22. }
  23. return data.cap_sign;
  24. } catch (error) {
  25. $.logger.error(“获取用户信息异常”, error.message);
  26. }
  27. }
  28. function signIn($) {
  29. try {
  30. let { data, code, status, message } = $.api.sign();
  31. if (code !== 0) {
  32. $.logger.info(“签到失败”, code, status, message);
  33. return;
  34. }
  35. return data.sign_daily_reward;
  36. } catch (error) {
  37. $.logger.error(“签到异常”, error.message);
  38. }
  39. }
  40. function run($) {
  41. try {
  42. let info = getInfo($);
  43. if (!info) {
  44. $.logger.error(“登录失败”);
  45. return;
  46. }
  47. let { sign_progress, sign_rewards, sign_target, sign_daily } = info;
  48. if (sign_daily) {
  49. $.logger.info(`\u4ECA\u65E5\u5DF2\u7B7E\u5230${sign_rewards[sign_progress – 1].name}\uFF0C\u8FDE\u7B7E\u8FDB\u5EA6${sign_progress}/${sign_target}\u3002`);
  50. return;
  51. }
  52. let dailyReward = signIn($);
  53. dailyReward && $.logger.info(`\u7B7E\u5230\u6210\u529F\uFF0C\u83B7\u5F97${dailyReward / 1048576}M\uFF0C\u8FDE\u7B7E\u8FDB\u5EA6${sign_progress + 1}/${sign_target}\u3002`);
  54. } catch (error) {
  55. $.logger.error(“运行异常”, error.message);
  56. }
  57. }
  58. // ../../packages/utils-pure/index.ts
  59. function createLogger(options) {
  60. let wrap = (type, args)=>{
  61. if (options && options.pushData) {
  62. let msg = args.reduce((str, cur)=>`${str} ${cur}`, “”).substring(1);
  63. options.pushData.push({
  64. msg: msg,
  65. type: type,
  66. date: /* @__PURE__ */ new Date()
  67. });
  68. }
  69. console[type](…args);
  70. };
  71. return {
  72. info: (…args)=>wrap(“info”, args),
  73. error: (…args)=>wrap(“error”, args),
  74. debug: (…args)=>wrap(“info”, args)
  75. };
  76. }
  77. // ../../core/push/index.ts
  78. function _send({ logger, http }, name = “自定义消息”, options) {
  79. try {
  80. let requestOptions = {
  81. method: “POST”,
  82. headers: {
  83. “Content-Type”: “application/json”
  84. },
  85. timeout: 1e4,
  86. options
  87. };
  88. Reflect.has(options, “data”) && Reflect.has(options.data, “agent”) && (requestOptions.agent = options.data.agent, delete options.data.agent);
  89. let data = http.fetch(requestOptions), { errcode, code, err } = data;
  90. if (errcode || err || ![
  91. 0,
  92. 200,
  93. void 0
  94. ].some((c)=>code === c)) return logger.error(`${name}\u53D1\u9001\u5931\u8D25`, JSON.stringify(data));
  95. logger.info(`${name}\u5DF2\u53D1\u9001\uFF01`);
  96. } catch (error) {
  97. logger.info(`${name}\u53D1\u9001\u5931\u8D25: ${error.message}`);
  98. }
  99. }
  100. function pushplus(apiOption, { token, option }, title, text) {
  101. return _send(apiOption, “pushplus”, {
  102. url: “http://www.pushplus.plus/send”,
  103. method: “POST”,
  104. data: {
  105. token: token,
  106. title: title,
  107. content: text,
  108. option
  109. }
  110. });
  111. }
  112. function serverChan(apiOption, { token, option }, title, text) {
  113. return _send(apiOption, “Server酱”, {
  114. url: `https://sctapi.ftqq.com/${token}.send`,
  115. headers: {
  116. “content-type”: “application/x-www-form-urlencoded”
  117. },
  118. data: {
  119. text: title,
  120. desp: text.replaceAll(`
  121. `, `
  122.  
  123. `),
  124. option
  125. }
  126. });
  127. }
  128. function workWeixin(apiOption, { msgtype = “text”, touser = “@all”, agentid, corpid, corpsecret, option }, title, text) {
  129. try {
  130. let { access_token } = apiOption.http.fetch({
  131. url: “https://qyapi.weixin.qq.com/cgi-bin/gettoken”,
  132. method: “POST”,
  133. data: {
  134. corpid: corpid,
  135. corpsecret: corpsecret
  136. },
  137. headers: {
  138. “Content-Type”: “application/json”
  139. }
  140. });
  141. return _send(apiOption, “企业微信推送”, {
  142. url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${access_token}`,
  143. data: {
  144. touser: touser,
  145. msgtype: msgtype,
  146. agentid: agentid,
  147. [msgtype]: {
  148. content: `${title}
  149.  
  150. ${text}`
  151. },
  152. option
  153. }
  154. });
  155. } catch (error) {
  156. apiOption.logger.error(“企业微信推送失败”), apiOption.logger.error(error);
  157. }
  158. }
  159. function workWeixinBot(apiOption, { url, msgtype = “text”, option }, title, text) {
  160. return _send(apiOption, “企业微信Bot推送”, {
  161. url: url,
  162. data: {
  163. msgtype: msgtype,
  164. [msgtype]: {
  165. centent: `${title}
  166.  
  167. ${text}`
  168. },
  169. option
  170. }
  171. });
  172. }
  173. function bark(apiOption, { key, level = “passive”, options }, title, text) {
  174. return _send(apiOption, “Bark ios 推送”, {
  175. url: `https://api.day.app/${key}`,
  176. data: {
  177. body: text,
  178. title: title,
  179. level: level,
  180. options
  181. }
  182. });
  183. }
  184. function twoIm(apiOption, { key, sid, query, msgtype = “text”, options }, title, text) {
  185. let urlSearch = new URLSearchParams({
  186. key: key,
  187. sid: sid
  188. });
  189. return query && Object.entries(query).forEach(([key2, value])=>{
  190. urlSearch.append(key2, String(value));
  191. }), _send(apiOption, “Bark ios 推送”, {
  192. url: `https://api.2im.cn/push?${urlSearch.toString()}`,
  193. data: {
  194. msgtype: msgtype,
  195. content: text,
  196. title: title,
  197. options
  198. }
  199. });
  200. }
  201. // ../utils/index.ts
  202. function createSimpleRequest(headers) {
  203. return {
  204. get: (url)=>HTTP.get(url, {
  205. headers: headers
  206. }).json(),
  207. post: (url, data)=>HTTP.post(url, typeof data == “string” ? data : JSON.stringify(data), {
  208. headers: headers
  209. }).json()
  210. };
  211. }
  212. function getPushConfig() {
  213. let usedRange2 = Application.Sheets.Item(“推送”).UsedRange;
  214. if (!usedRange2) return console.log(“未开启推送”), {};
  215. let cells = usedRange2.Columns.Cells, columnEnd = Math.min(50, usedRange2.ColumnEnd), rowEnd = Math.min(50, usedRange2.RowEnd), pushConfig = {};
  216. for(let option = usedRange2.Column; option <= columnEnd; option++){
  217. let t = {}, item = cells.Item(option);
  218. if (item.Text) {
  219. pushConfig[item.Text] = t;
  220. for(let kv = 1; kv <= rowEnd; kv++){
  221. let key = item.Offset(kv).Text;
  222. key.trim() && (t[key] = valueHandle(item.Offset(kv, 1).Text.trim()));
  223. }
  224. }
  225. }
  226. let base = pushConfig.base;
  227. if (!base) return pushConfig;
  228. return delete pushConfig.base, {
  229. pushConfig,
  230. base
  231. };
  232. function valueHandle(value) {
  233. return value === “TRUE” || value === “是” ? !0 : value === “FALSE” || value === “否” ? !1 : value;
  234. }
  235. }
  236. function email({ logger }, email2, title, text) {
  237. try {
  238. if (!email2 || !email2.pass || !email2.from || !email2.host) return;
  239. let port = email2.port || 465, toUser = email2.to || email2.from;
  240. SMTP.login({
  241. host: email2.host,
  242. // 域名
  243. port: port,
  244. // 端口
  245. secure: port === 465,
  246. // TLS
  247. username: email2.from,
  248. // 账户名
  249. password: email2.pass
  250. }).send({
  251. from: `${title} <${email2.from}>`,
  252. to: toUser,
  253. subject: title,
  254. text: text.replace(/\n/g, `\r
  255. `)
  256. }), logger.info(“邮件消息已发送”);
  257. } catch (error) {
  258. logger.error(“邮件消息发送失败”, error.message);
  259. }
  260. }
  261. function sendNotify(op, data, title, text) {
  262. let cbs = {
  263. pushplus: pushplus,
  264. serverChan: serverChan,
  265. workWeixin: workWeixin,
  266. email: email,
  267. workWeixinBot: workWeixinBot,
  268. bark: bark,
  269. twoIm: twoIm
  270. };
  271. for (let [name, d] of Object.entries(data)){
  272. let cb = cbs[name];
  273. cb && cb(op, d, title, text);
  274. }
  275. }
  276. function sendWpsNotify(pushData2, pushConfig) {
  277. if (pushData2.length && pushConfig && !(pushConfig.onlyError && !pushData2.some((el)=>el.type === “error”))) {
  278. let msg = pushData2.map((m)=>`[${m.type} ${m.date.toLocaleTimeString()}]${m.msg}`).join(`
  279. `);
  280. msg && sendNotify({
  281. logger: createLogger(),
  282. http: {
  283. fetch: (op)=>(op.data && typeof op.data != “string” && (op.body = JSON.stringify(op.data)), HTTP.fetch(op.url, op).json())
  284. }
  285. }, pushConfig, pushConfig.title || “asign 运行推送”, msg);
  286. }
  287. }
  288. // index.ts
  289. function main(cookie, option) {
  290. if (!cookie) return;
  291. let logger = createLogger({
  292. pushData: option && option.pushData
  293. }), $ = {
  294. api: createApi(createSimpleRequest({
  295. “content-type”: “application/json”,
  296. “user-agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0”,
  297. cookie: cookie
  298. })),
  299. logger: logger,
  300. sleep: Time.sleep
  301. };
  302. $.logger.info(“————–“), run($);
  303. }
  304. var sheet = Application.Sheets.Item(“夸克网盘”) || Application.Sheets.Item(“quark”) || ActiveSheet, usedRange = sheet.UsedRange, columnA = sheet.Columns(“A”), len = usedRange.Row + usedRange.Rows.Count 1, pushData = [];
  305. for(let i = 1; i <= len; i++){
  306. let cell = columnA.Rows(i);
  307. cell.Text && (console.log(`\u6267\u884C\u7B2C ${i} \u884C`), main(cell.Text, {
  308. pushData: pushData
  309. }));
  310. }
  311. sendWpsNotify(pushData, getPushConfig());

 

暂无介绍....

延伸阅读:

WPS 实现阿里云盘自动签到,轻松获得签到奖励

  零成本,无服务器,纯小白实现阿里云盘每天自动签到, 解放双手,轻松获得容量延期卡、VIP会员天数等奖励!!...

编号89757
2025年6月20日
云众推客邀请码

云众推客官网云众推客APP云众推客邀请码,云众推客app拉新平台,寻找一款高效、可靠的拉新平台对于企业和个人来说至关重要...

编号89757
2025年5月29日
月入2万:我在云众推找到了「不熬夜、不囤货」的副业密码

最近后台总有人私信我:“有没有不用熬夜、不用囤货,普通人也能做的副业?”“刷手机就能赚钱是真的吗?”“怕被割韭菜,求推荐...

编号89757
2025年7月30日
2026年最新⼀刻相册无限空间激活方法

一刻相册无限空间激活方法

编号89757
2025年7月29日