- Install nodejs https://nodejs.org/en/download/.
- Clone repository.
cd
to clonned repository.- Run
npm install
- Go to Google Bookmarks: https://www.google.com/bookmarks/.
- On the bottom left, click "Export bookmarks".
- Save the GoogleBookmarks.html file to the project folder.
- Run
npm install
- Find GoogleBookmarks.kml in the project folder.
Algorythm is following:
- Script opens the links provided in the GoogleBookmarks.html using the Chrome user agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
. - Script search for the
<meta>
tag with content like<meta content="https://maps.google.com/maps/api/staticmap?sensor=false&center=35.65858048019947%2C139.7432442152582&zoom=16&size=256x256&language=en&markers=35.6585805%2C139.7454329&client=google-maps-frontend&signature=EkdXkpjZDhS6mphd4u-riHzWCds" itemprop="image" property="og:image">
- Script tries to extract the "markers" value, in case if it is missed, script tries to extract the values from "center" (probably it will work for the cases when the expoting values is not a poit, but kind of a square with multiple poins).
- Script uses extracted values to populate the kml. Extracted values could be not preceise, since the way we are getting it is rather tricky.