- Node.Js version > 12
- Chromium
npm install -g yarn
yarn install
- First, you need to crawl all url of places in a country (this project now support Vietnam)
- Then, you can crawl all detail information of the places above, they are automatically filter by country
You must pass 2 arguments:
-
action: Value:crawl-urlsorcrawl-detail- Use
crawl-urlsfor crawling url of places - Use
crawl-detailsfor crawling detail information of places
- Use
-
query: for searching inGoogle maps- Example: hotel, drink, cà phê, sửa ô tô
-
size: for multiple pages (tabs) of browser, quickly crawl data but cost more memory- Example: 10
-
headless: for debug, unhide the browser, recommended true- Example: true
yarn start [arguments list]
Example:
yarn start --action="crawl-urls" --query="khách sạn"
All result is stored into json files at ./data path