check if ScreenName in response is empty instead of Name, since Name can be unset by user.
This commit is contained in:
parent
d33882ff94
commit
9bbc7aa2ab
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ func (s *Scraper) GetProfile(username string) (Profile, error) {
|
|||
return Profile{}, fmt.Errorf("rest_id not found")
|
||||
}
|
||||
|
||||
if jsn.Data.User.Legacy.Name == "" {
|
||||
if jsn.Data.User.Legacy.ScreenName == "" {
|
||||
return Profile{}, fmt.Errorf("either @%s does not exist or is private", username)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue