Skip to content

Instantly share code, notes, and snippets.

@pastak
Last active December 25, 2019 08:06
Show Gist options
  • Save pastak/37afdce4c5fe632db68754c19c44656f to your computer and use it in GitHub Desktop.
Save pastak/37afdce4c5fe632db68754c19c44656f to your computer and use it in GitHub Desktop.
映画館の鑑賞履歴をパースする君たち
// https://wata.aeoncinema.com/Aem/usr/whistory.do
$$('.history_container').map(e => `- ${e.querySelector('h3').textContent.replace(/^\s+/, '').replace(/\s+$/, '')}\n - 鑑賞日: ${e.querySelectorAll('.date > span')[1].textContent}`).reverse().join('\n')
// https://kyoto-minamikaikan.jp/history/
[...$$('#history_table tbody > tr')].map(e => `- ${e.querySelector('td:nth-child(2)').textContent}\n - 鑑賞日: ${e.querySelector('td').textContent.split(/\s/)[0]}`).reverse().join('\n')
// https://member.smt-cinema.com/Sesc/usr/whistory.do
[...$$('.oneHistory')].filter(e => e.querySelector('.naiyo').textContent.includes('2019')).map(e => `- ${e.querySelector('h3').textContent}\n - 鑑賞日: ${e.querySelector('.naiyo').textContent}`).reverse().join('\n')
// https://tjoy.jp/t-joy_kyoto/mypage/history
[...$$('.tab__content')].filter(e => e.querySelector('.tab__content--divstextfixbottom > p').textContent.includes('2019/')).map(e => `- ${e.querySelector('.tab__content--title').textContent.replace(/^\s+/, '').replace(/\s+$/, '')}\n - 鑑賞日: ${e.querySelector('.tab__content--divstextfixbottom > p').textContent.split(')')[0].replace(/^\s+/, '') + ')'}`).reverse().join('\n')
// https://hlo.tohotheater.jp/net/mypage/TNPI3120J01.do
// 10件ずつしか出ないのでポチポチやる
[...$$('.mileage-section')].map(e => `- ${e.querySelector('.title').textContent.replace(/^\n\s+/, '')}\n - 鑑賞日: ${e.querySelector('.mileage-section__row > .text').textContent}`).reverse().join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment