Skip to content

Commit

Permalink
fix(route): broken lofter route (DIYgod#15310)
Browse files Browse the repository at this point in the history
* fix(route): broken lofter route

* fix(routes): add my name to maintainers
  • Loading branch information
LucunJi authored Apr 20, 2024
1 parent 24bd98e commit 5991ecb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/routes/lofter/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| ---- | ---- | ---- | ----- | ----- |
Expand All @@ -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: '',
Expand All @@ -55,7 +55,7 @@ async function handler(ctx) {
'c0-param7': `number:${startingIndex}`,
'c0-param8': 'number:0',
batchId: 493053,
},
}),
});

const dom = new JSDOM(
Expand Down
6 changes: 3 additions & 3 deletions lib/routes/lofter/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const route: Route = {
supportScihub: false,
},
name: 'User',
maintainers: ['hondajojo', 'nczitzk'],
maintainers: ['hondajojo', 'nczitzk', 'LucunJi'],
handler,
};

Expand All @@ -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',
Expand All @@ -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) {
Expand Down

0 comments on commit 5991ecb

Please sign in to comment.