Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue retrieving own activity's owner name #13

Closed
isaac-chung opened this issue Oct 16, 2023 · 3 comments · Fixed by #14
Closed

Issue retrieving own activity's owner name #13

isaac-chung opened this issue Oct 16, 2023 · 3 comments · Fixed by #14
Labels
help wanted Extra attention is needed

Comments

@isaac-chung
Copy link
Owner

Looking over the logs, it seems like this line is having trouble.

 h = container.get_by_test_id("owners-name").get_attribute('href')

The id might not exist anymore, or under a different structure. Would be good to have a fix.

@isaac-chung isaac-chung added the help wanted Extra attention is needed label Oct 16, 2023
@domantascibas
Copy link
Contributor

domantascibas commented Oct 17, 2023

it looks like the owners-name id is still present in the web-feed-entry element.

<a href="/athletes/xxxx" data-testid="owners-name">AAA AAA</a>

After some closer inspection, the problem is caused by the club activity notifications and club member posts, i.e.:

image

image

They don't have the owners-name IDs and instead have one of these wrappers (depending on the post type):

  • <div data-testid="group-header" role="link" tabindex="-1"><a href="/athletes/xxxx">AAA AAA</a> joined a club</div>
  • <div class="clubMemberPostHeaderLinks"><a class="athleteLink" href="/athletes/xxxx">AAA AAA</a> in <a class="clubLink" href="/clubs/YYYY">BBB BBB</a></div>

So the Some issue with getting owners-name container. error is thrown when the script is trying to parse the club posts, and does not encounter problems with getting owners-name from workouts.

In the end this error does not cause issues, but could probably be handled in a better way

@isaac-chung
Copy link
Owner Author

@domantascibas Great findings, thanks!
Maybe we can add a check for club-related containers and return False accordingly?

@domantascibas
Copy link
Contributor

I think that would be the best way. I'll try to find some time today to add this check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants