Last active
November 27, 2025 22:27
-
-
Save rugk/dc0781ea3782301b9f71f408ab72ec3c to your computer and use it in GitHub Desktop.
Extract all products and their links (as simple HTML); to be pasted into the browser console. You can then paste and open a simple HTML file for copying it to a WYSIWYG editor e.g. – https://www.bizay.de
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const productLinks = []; | |
| const seenTitles = new Set(); | |
| Array.from(document.querySelectorAll(".product-title")).forEach(x => { | |
| const title = x.textContent.trim(); // Get the product name | |
| const link = x.closest('a').href; // Get the closest <a> link | |
| // Check if the product name has already been processed | |
| if (!seenTitles.has(title)) { | |
| seenTitles.add(title); // Mark this product name as seen | |
| productLinks.push(`<a href="${link}" target="_blank">${title}</a>`); | |
| } | |
| }); | |
| // Join the list into a single string of HTML links | |
| const htmlLinks = productLinks.join("<br>\n"); | |
| // Output the result to the console | |
| console.log(htmlLinks); | |
| copy(htmlLinks) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment