refactor(route/twitter): support both `timeline` and `timeline_v2` in twitter web api
This commit is contained in:
parent
aaac8a2626
commit
5048710a37
|
|
@ -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)}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue