Created
January 6, 2024 07:19
-
-
Save hawtim/8f2cdc72a9a4fa09e07ffccf63bcfb23 to your computer and use it in GitHub Desktop.
get all external images by matching text content
This file contains 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
Array.from(new Set(Array.from(new Set(Array.from(document.getElementsByTagName('*')).filter(item => item.innerText).map(item => item.innerText.includes('https') && item.innerText).filter(Boolean))).map(item => item.match(/https?:\/\/.*(img|image)+.*/gim)).flat(Infinity))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment