This commit is contained in:
lowlighter
2021-07-30 20:23:21 +02:00
3 changed files with 8 additions and 7 deletions

View File

@@ -5,6 +5,8 @@
Generate your metrics that you can embed everywhere, including your GitHub profile readme! It works for both user and organization accounts, and even for repositories! Generate your metrics that you can embed everywhere, including your GitHub profile readme! It works for both user and organization accounts, and even for repositories!
> <sup>*⚠️ This is the documentation of **v3.12-beta** (`@master` branch) which includes [unreleased features](https://github.com/lowlighter/metrics/compare/latest...master), see documentation of [**v3.11** (`@latest` branch) here](https://github.com/lowlighter/metrics/blob/latest/README.md).*</sup>
<table> <table>
<tr> <tr>

View File

@@ -62,7 +62,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
{ {
await page.goto(`https://github.community/u/${login}/badges`) await page.goto(`https://github.community/u/${login}/badges`)
const frame = page.mainFrame() const frame = page.mainFrame()
await frame.waitForSelector(".user-badges-list") await frame.waitForSelector(".badge-group-list")
const badges = await frame.evaluate(() => ({ const badges = await frame.evaluate(() => ({
uniques:[...document.querySelectorAll(".badge-card .badge-link")].map(el => el.innerText), uniques:[...document.querySelectorAll(".badge-card .badge-link")].map(el => el.innerText),
multiples:[...document.querySelectorAll(".grant-count")].map(el => Number(el.innerText)), multiples:[...document.querySelectorAll(".grant-count")].map(el => Number(el.innerText)),

View File

@@ -1,6 +1,5 @@
# To comment out once #421 is solved - name: Support plugin (default)
#- name: Support plugin (default) uses: lowlighter/metrics@latest
# uses: lowlighter/metrics@latest with:
# with: token: MOCKED_TOKEN
# token: MOCKED_TOKEN plugin_support: yes
# plugin_support: yes