- Clone this repository.
- Run
npm install
.
- Visit this link.
- Open DevTools and go to network tab.
- Refresh the page so you can see the requests.
- Filter requests by
fetch/xhr
. - There should be a request which name starts with
filter/?
- Open the request and go to preview tab.
- Expand
result
field and right-click ondirectories
and selectCopy object
. - Create a
data.json
file insideinput
folder. - Add copied object to
data.json
.
Normalizing will normalized.json
file inside output
folder.
Its content is almost identical as data.json
but it has a few differences.
For example field names or object structures may change.
Overall it's just a simple map that cleans up data a little bit.
- Run
npm run normalize
.
Scraping will gather additional content from the website.
It will generate a dedicated file for each attraction inside output/scraped
folder.
This way if some error happens in the middle of the scraping, previous results will be safe.
Also, if you run scrape script again, attractions that are already scraped, won't be scraped again.
It's necessary to run normalize script before scraping,
because scrapers read id and url from normalized.json
file.
- Run
npm run scrape
.
After running normalize script and then scrape script, It's time to merge the results of these scripts together.
This will generate a db.json
file, which you can use to populate the database with.
- Run
npm run merge
.
- Run
npm run db
. - Visit
http://localhost:3000/