Support plugin: fix crash because of outdated selector (#428)
This commit is contained in:
@@ -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)),
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user