This project built a travel website called InsTrip , which makes users to explore the most popular travel cities and photo spots on Instagram. To analyze Instagram data, this project created web scrapers to extract Instagram posts with travel-related hashtags and check-in data. It also used ChatGPT to provide travel destination introductions based on data analysis charts.


Create .env
file to set environment variables needed in this project.
DB_USER=YOUR_DB_USER_NAME
DB_PASSWORD=YOUR_DB_PASSWORD
DB_HOST=YOUR_DB_HOST
DB_PORT=YOUR_DB_PORT
DB_NAME=YOUR_DB_NAME
API_TOKEN=YOUR_API_TOKEN
IG_ACCOUNT=YOUR_IG_ACCOUNT
IG_PASSWORD=YOUR_IG_PASSWORD
Run docker-compose.yml
to create the docker container for the Django web application.
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up
Here are two web scrapers that can be executed through any scheduling tool.
- ig_post_scraper.py: extract posts with travel hastag, like:
#日本旅遊
or#韓國旅遊
. - ig_location_scraper.py: extract location information of the posts with check-in.
$ python web_scraper/ig_post_scraper.py [country name]
$ python web_scraper/ig_location_scraper.py
api/top/city/{country}
: get the ranking of the most popular cities among tourists on Instagramapi/city/{city}/info
: get the city informationapi/top/location/{city}
: get the ranking of the most popular photo attractions (group by the category of attractions)


