Skip to content

Instantly share code, notes, and snippets.

@kevinkace
Created May 15, 2025 03:09
Show Gist options
  • Select an option

  • Save kevinkace/189a3c532b4b402bf9ecffd23db6eac6 to your computer and use it in GitHub Desktop.

Select an option

Save kevinkace/189a3c532b4b402bf9ecffd23db6eac6 to your computer and use it in GitHub Desktop.
[ ...document.querySelectorAll("tbody tr") ]
.filter(tr => tr.querySelector("td[data-text]")?.attributes["data-text"].value.includes("404"))
.map(tr => {
const td = tr.querySelector("[data-text]");
const ts = tr.querySelector("td:nth-child(2)");
const { value } = td.attributes["data-text"];
const url = value.match(/url: (.*?)[;}]/)[1];
const referer = value.match(/referer: (.*?)[;}]/);
const ip = value.match(/ip: (.*?)[;}]/);
return [ts.innerText.split(" ")[0], url, referer && referer[1], ip && ip[1]].join(",");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment