diff --git a/pkg/client/trakt.go b/pkg/client/trakt.go index e2f5109..1379081 100644 --- a/pkg/client/trakt.go +++ b/pkg/client/trakt.go @@ -208,7 +208,7 @@ func (tc *TraktClient) ActivateAuthorize(authenticityToken string) error { if err != nil { return err } - value, err := selectorAttributeScrape(response.Body, "#desktop-user-avatar", "href") + value, err := selectorAttributeScrape(response.Body, "a.visible-xs", "href") if err != nil { return err } diff --git a/pkg/client/trakt_test.go b/pkg/client/trakt_test.go index 87b06f1..e38063f 100644 --- a/pkg/client/trakt_test.go +++ b/pkg/client/trakt_test.go @@ -1804,7 +1804,7 @@ func TestTraktClient_ActivateAuthorize(t *testing.T) { httpmock.RegisterResponder( http.MethodPost, traktPathBaseBrowser+traktPathActivateAuthorize, - httpmock.NewStringResponder(http.StatusOK, ``), + httpmock.NewStringResponder(http.StatusOK, `Profile`), ) }, assertions: func(assertions *assert.Assertions, err error) { @@ -1856,7 +1856,7 @@ func TestTraktClient_ActivateAuthorize(t *testing.T) { httpmock.RegisterResponder( http.MethodPost, traktPathBaseBrowser+traktPathActivateAuthorize, - httpmock.NewStringResponder(http.StatusOK, ``), + httpmock.NewStringResponder(http.StatusOK, `Profile`), ) }, assertions: func(assertions *assert.Assertions, err error) { @@ -2027,7 +2027,7 @@ func TestTraktClient_Hydrate(t *testing.T) { httpmock.RegisterResponder( http.MethodPost, traktPathBaseBrowser+traktPathActivateAuthorize, - httpmock.NewStringResponder(http.StatusOK, ``), + httpmock.NewStringResponder(http.StatusOK, `Profile`), ) httpmock.RegisterResponder( http.MethodPost, @@ -2229,7 +2229,7 @@ func TestTraktClient_Hydrate(t *testing.T) { httpmock.RegisterResponder( http.MethodPost, traktPathBaseBrowser+traktPathActivateAuthorize, - httpmock.NewStringResponder(http.StatusOK, ``), + httpmock.NewStringResponder(http.StatusOK, `Profile`), ) httpmock.RegisterResponder( http.MethodPost,