Skip to content

Commit

Permalink
fix: twitter null data check
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Sep 21, 2024
1 parent 380ca2f commit e3240eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/twitter/api/web-api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit e3240eb

Please sign in to comment.