@the-convocation/twitter-scraper 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -912,6 +912,12 @@ async function getProfile(username, auth) {
912
912
  }
913
913
  const { result: user } = value.data.user;
914
914
  const { legacy } = user;
915
+ if (user.__typename === "UserUnavailable" && user?.reason === "Suspended") {
916
+ return {
917
+ success: false,
918
+ err: new Error("User is suspended.")
919
+ };
920
+ }
915
921
  if (user.rest_id == null || user.rest_id.length === 0) {
916
922
  return {
917
923
  success: false,