sfirke / packagemetrics

A Package for Helping You Choose Which Package to Use
Other
134 stars 6 forks source link

HTML, Node changes in Github? #61

Closed miljukov-o closed 2 years ago

miljukov-o commented 2 years ago

Hi, I wanted to compare some packages via package_list_metrics() and got the error:

Error: Can't subset columns that don't exist. x Column aria-label doesn't exist.

After looking through the package codes, it seems the node ".social-count" doesn't work here (anymore?). https://github.com/sfirke/packagemetrics/blob/9fb47b1043477ae7563dd8b580893706208e46ed/R/scrape_github_url.R#L72

I also couldn't find the node in the html e.g. in https://github.com/dcomtois/summarytools. But when I use ".Counter"as node, then I get the numbers, which are probably collected here, but probably in a different structure than suppused to, because the subsequent code throws the next errors.

sfirke commented 2 years ago

I'm tickled that this package is getting used, and scraping is a nice diversion, so I took a shot at it. Let me know if the new version fixes your problem? I should have read your post more closely as I see ".Counter" does work well as a node, indeed as a different structure than expected previously. I went with node "span.text-bold" which also gets those two numbers.

We'll see how long this lasts before GitHub changes their page HTML 😁

miljukov-o commented 2 years ago

Thanks a lot for this super quick fix. It works :)