The project is just for fun and test programming skills. It consists of two parts - the server and crawler.
- Runs on 8080 port;
- Gets the list of wallpapers from database;
- Render the html page with the list of wallpaper;
- Allows you to authenticate the user through OAuth2 Dropbox, gets access_token and stores the user in a database;
- Parses website https://wallhaven.cc and collects direct URL's at the wallpaper;
- Saves list of wallpapers in the database;
- Upload wallpapers for each user in Dropbox directory.
- Create MySQL database
wallswap
and importwallswap.sql
- Create Dropbox App and fill
env.env
export DROPBOX_CLIENT_ID='APP_KEY_HERE'
export DROPBOX_CLIENT_SECRET='APP_SECRET_HERE'
- Redirect URL for Dropbox callback:
http://localhost:8080/oauth2callback
- Install glide dependencies:
cd wallswap-go
glide update
- Run server:
go run http.go
- Run crawl once a week:
go run crawl.go
- Macaron
- MySQL
- golang.org/x/oauth2