Skip to content

Instantly share code, notes, and snippets.

@nrm176
Last active November 27, 2018 04:01
Show Gist options
  • Save nrm176/65a5c7a04057b5ceed11205f836882ad to your computer and use it in GitHub Desktop.
Save nrm176/65a5c7a04057b5ceed11205f836882ad to your computer and use it in GitHub Desktop.
株探の任意のページから証券コードのみを抽出するスニペット

How to use

  1. Open any web page on Kabutan with Chrome

  2. Open Chrome Developer Tool, copy and paste the following code on its console, and then execute it

Array.from(document.querySelectorAll('div#main article div.body a')).filter((e) => {return e.href.includes('stock/?code=')}).map((e)=>{return e.innerText}).filter((e)=>{return e.length == 4})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment