Last active
December 2, 2025 05:43
-
-
Save oonyanya/40fd5b26a100d338aec3d732c52136db to your computer and use it in GitHub Desktop.
川口市の投票所から投票所名、住所、経度、緯度を取り出すやつ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const links = document.querySelectorAll('#contents-in table tr').forEach((tr)=>{ | |
| let datas = tr.querySelectorAll('td p'); | |
| if(datas.length == 0) | |
| return; | |
| let address = datas[2].textContent; | |
| let as = tr.querySelectorAll('td p a'); | |
| let a = as[0]; | |
| let url = a.getAttribute('href'); | |
| let text = a.textContent.trim(); | |
| str = new URL(url).searchParams.get("ll").split(","); | |
| console.log(text + ","+ address +"," + str[1] + "," + str[0]); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment