Created
October 11, 2021 11:31
-
-
Save manjeshpv/1f1c78c5c6498a922a3ef21d5e1d31d8 to your computer and use it in GitHub Desktop.
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
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
any way to do with rest API like php or http?