@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.
@@ -892,6 +892,12 @@ async function getProfile(username, auth) {
892
892
  }
893
893
  const { result: user } = value.data.user;
894
894
  const { legacy } = user;
895
+ if (user.__typename === "UserUnavailable" && user?.reason === "Suspended") {
896
+ return {
897
+ success: false,
898
+ err: new Error("User is suspended.")
899
+ };
900
+ }
895
901
  if (user.rest_id == null || user.rest_id.length === 0) {
896
902
  return {
897
903
  success: false,