Using browser's Dev Tools to collect elements from a page

Example -- you want to grab all of the h2 headings from the current page.

Use the browser's dev tools (available with key Function 12, F12) -- and enter this command in the console:

let s = []; document.querySelectorAll("h2").forEach(function (el) { s.push(el.innerText);}); copy(s.join("\n"));

You may use different selectors instead for other text.

Source

See also