fix: twitter null data check

This commit is contained in:
DIYgod 2024-09-22 01:34:28 +08:00
parent 380ca2f269
commit e3240eb6c2
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ export const twitterGot = async (url, params) => {
},
dispatcher: dispatchers[token].agent,
onResponse: async ({ response }) => {
if (response.status === 403 || response.status === 401 || response.status === 429) {
if (response.status === 403 || response.status === 401 || response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') {
const newCookie = await login({
username: config.twitter.username?.[index],
password: config.twitter.password?.[index],