add GetProfileByID method

This commit is contained in:
Valentine 2024-08-09 14:03:05 +03:00
parent c57301623b
commit a611486a08
4 changed files with 105 additions and 10 deletions

View file

@ -135,6 +135,17 @@ func TestGetProfileErrorNotFound(t *testing.T) {
}
}
func TestGetProfileByID(t *testing.T) {
profile, err := testScraper.GetProfileByID("1221221876849995777")
if err != nil {
t.Error(err)
}
if profile.Username != "tomdumont" {
t.Errorf("Expected username 'tomdumont', got '%s'", profile.Username)
}
}
func TestGetUserIDByScreenName(t *testing.T) {
userID, err := testScraper.GetUserIDByScreenName("Twitter")
if err != nil {