refactor(route/twitter): support both `timeline` and `timeline_v2` in twitter web api

This commit is contained in:
pseudoyu 2025-06-18 09:58:54 +08:00
parent aaac8a2626
commit 5048710a37
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ export const paginationTweets = async (endpoint: string, userId: number | undefi
return instructions.instructions;
}
const instructions = data?.user?.result?.timeline?.timeline?.instructions;
const instructions = data?.user?.result?.timeline?.timeline?.instructions || data?.user?.result?.timeline?.timeline_v2?.instructions;
if (!instructions) {
logger.debug(`twitter debug: instructions not found in data: ${JSON.stringify(data)}`);
}