From b6ffa732acc0423c044ea2763728db77534d97be Mon Sep 17 00:00:00 2001 From: Thiago Perrotta Date: Thu, 17 Nov 2022 13:26:08 +0100 Subject: [PATCH] docs: fix cross-browser.js example (#9291) The previous selector is broken as of ~2 months ago, c.f. https://news.ycombinator.com/item?id=33027700 Changed from: To: --- examples/cross-browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cross-browser.js b/examples/cross-browser.js index fbe9166ae80..5027afb8752 100644 --- a/examples/cross-browser.js +++ b/examples/cross-browser.js @@ -34,7 +34,7 @@ const firefoxOptions = { await page.goto('https://news.ycombinator.com/'); // Extract articles from the page. - const resultsSelector = '.titlelink'; + const resultsSelector = '.titleline > a'; const links = await page.evaluate(resultsSelector => { const anchors = Array.from(document.querySelectorAll(resultsSelector)); return anchors.map(anchor => {