Skip to content

Instantly share code, notes, and snippets.

@aikatsukamen
Created January 29, 2022 14:13
Show Gist options
  • Select an option

  • Save aikatsukamen/07f780b9e8cdd7c4483997d09db33d30 to your computer and use it in GitHub Desktop.

Select an option

Save aikatsukamen/07f780b9e8cdd7c4483997d09db33d30 to your computer and use it in GitHub Desktop.
まうまう
// https://www.mau2.com/anime/aikatu/casts
var list = [];
const stories = document.querySelectorAll(".lineUp");
stories.forEach((item, index) => {
//console.log(item);
let subtitle = "";
item.querySelectorAll("tr").forEach((tr, i2) => {
if(i2 === 0) {
subtitle = tr.innerText;
} else {
const td = tr.querySelectorAll("td");
const chara = td[0].innerText;
const actor = td[1].innerText;
list.push({
subtitle,
chara,
actor,
});
}
});
});
console.log(list.map(item => `"${item.subtitle}", "${item.chara}", "${item.actor}"`).join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment