Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anujsinghwd/d0db8ed0d68e21eb1f33eec97eb58775 to your computer and use it in GitHub Desktop.
Save anujsinghwd/d0db8ed0d68e21eb1f33eec97eb58775 to your computer and use it in GitHub Desktop.
const axios = require('axios');
const fs = require('fs');
const process = async () => {
const response = await axios.get('https://goo.gl/maps/29XfoqKK5s7UdaSy8');
const expression = /window.APP_INITIALIZATION_STATE=\[\[\[\d+.\d+,(\d+.\d+),(\d+.\d+)/
const [,lat, long] = response.data.match(expression)[0].split('[[[')[1].split(',')
console.log({ lat, long})
return { lat, long};
}
process();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment