diff --git a/src/extension/content-script/batteries/Medium.ts b/src/extension/content-script/batteries/Medium.ts index 110304bd16..296da506b0 100644 --- a/src/extension/content-script/batteries/Medium.ts +++ b/src/extension/content-script/batteries/Medium.ts @@ -6,9 +6,12 @@ const urlMatcher = /^https:\/\/(.+\.)?medium.com\/(\S+)?/; const battery = (): void => { const name = document.querySelector(".pw-author-name")?.innerText; - const description = document.querySelector( - ".pw-follower-count ~ p" - )?.textContent; + + const description = document + .querySelector(".pw-author-name") + ?.parentElement?.parentElement?.querySelector("p") + ?.querySelector("span")?.textContent; + if (!name || !description) return; const match = findLightningAddressInText(description);