Last active
April 28, 2021 09:05
-
-
Save thany/a21281f2d9847d1c94c8c9d8a2447968 to your computer and use it in GitHub Desktop.
Get Denso Mapcode from Denso server using a bash command
This file contains 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
wget http://post.denso-communications.jp/dn/navicon_start.php --method=POST --body-data="lat=35.872722875676274&lng=139.73869658316153" -O - -q | grep -Po '(?<=id="mapcode">)([^<]*)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Disclaimer
Denso Co Ltd keep for themselves how to generate these codes, so using their server seems okay to me. Denso Mapcodes are widely used in Japan, especially in car satnavs, so obtaining mapcodes ought to be as free as free speech. Well, it bloody sure isn't. I understand that Japanese businesses do not yet fully understand the appeal of being open, so I suppose scripting it is the next best thing. They don't even provide the simplest of API's, so the second-best thing would be to scrape a webpage they return when requesting a code. And this command does exactly that.
References
https://en.wikipedia.org/wiki/Denso_mapcode
For more information on Denso Mapcode
Visually get mapcodes
http://japanmapcode.com/en
Does use its own proper JSON API, but since it's a personal project, I rather not "punish" him for Denso's fault of keeping everything a secret.