refactor(route/twitter): support both timeline and timeline_v2 in twitter web api
This commit is contained in:
@@ -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)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user