Skip to content

Instantly share code, notes, and snippets.

@srph
Created September 1, 2018 07:29
Show Gist options
  • Save srph/dda36888802bc0a540c200fd9385b27f to your computer and use it in GitHub Desktop.
Save srph/dda36888802bc0a540c200fd9385b27f to your computer and use it in GitHub Desktop.
JS: Get all 1080 magnet links from HorribleSubs
var els = Array.from(
document.querySelectorAll(".rls-info-container .link-1080p .hs-magnet-link a")
);
var links = ''
for (let i = 0; i < els.length; i++) {
var prefix = i === 0 ? '' : '\n\n'
var magnet = els[i];
links += `${prefix}${magnet.href}`
}
console.log(links)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment