From 5991ecbbbb4d3e1cf897b3f667fc1be31f6e3577 Mon Sep 17 00:00:00 2001 From: LucunJi <36262513+LucunJi@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:28:50 -0400 Subject: [PATCH] fix(route): broken lofter route (#15310) * fix(route): broken lofter route * fix(routes): add my name to maintainers --- lib/routes/lofter/tag.ts | 6 +++--- lib/routes/lofter/user.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/routes/lofter/tag.ts b/lib/routes/lofter/tag.ts index 684e7069e..4257c5c82 100644 --- a/lib/routes/lofter/tag.ts +++ b/lib/routes/lofter/tag.ts @@ -18,7 +18,7 @@ export const route: Route = { supportScihub: false, }, name: 'Tag', - maintainers: ['hoilc', 'nczitzk'], + maintainers: ['hoilc', 'nczitzk', 'LucunJi'], handler, description: `| new | date | week | month | total | | ---- | ---- | ---- | ----- | ----- | @@ -38,7 +38,7 @@ async function handler(ctx) { const response = await got({ method: 'post', url: apiUrl, - form: { + body: new URLSearchParams({ callCount: 1, scriptSessionId: '${scriptSessionId}187', httpSessionId: '', @@ -55,7 +55,7 @@ async function handler(ctx) { 'c0-param7': `number:${startingIndex}`, 'c0-param8': 'number:0', batchId: 493053, - }, + }), }); const dom = new JSDOM( diff --git a/lib/routes/lofter/user.ts b/lib/routes/lofter/user.ts index f3531b7f5..65cc415f0 100644 --- a/lib/routes/lofter/user.ts +++ b/lib/routes/lofter/user.ts @@ -18,7 +18,7 @@ export const route: Route = { supportScihub: false, }, name: 'User', - maintainers: ['hondajojo', 'nczitzk'], + maintainers: ['hondajojo', 'nczitzk', 'LucunJi'], handler, }; @@ -34,7 +34,7 @@ async function handler(ctx) { const response = await got({ method: 'post', url: `http://api.lofter.com/v2.0/blogHomePage.api?product=lofter-iphone-10.0.0`, - form: { + body: new URLSearchParams({ blogdomain: rootUrl, checkpwd: '1', following: '0', @@ -44,7 +44,7 @@ async function handler(ctx) { offset: '0', postdigestnew: '1', supportposttypes: '1,2,3,4,5,6', - }, + }), }); if (!response.data.response || response.data.response.posts.length === 0) {