2.7 KiB
nCore Profile Tracker
A simple Go project to scrape and track profile statistics (rank, upload, download, points) on nCore, the largest Hungarian BitTorrent tracker. The stats are stored in a SQLite database and displayed on a basic web interface.
Features
- Scrapes and logs profile stats from nCore for multiple users.
- Serves a simple HTML dashboard to display the latest data and historical charts.
- Provides a JSON API to fetch historical profile data.
- Stores all data persistently in a SQLite database.
- Automatically updates data every 24 hours.
Setup
-
Clone the repo:
git clone https://github.com/skidoodle/ncore-stats cd ncore-stats -
Create a
.envfile with your nCore credentials:NICK=your_nick PASS=your_password -
Add Users to Track
You can add users via the
--add-usercommand-line flag. Run this command for each user you want to track.The format is a single string:
'DisplayName,ProfileID'.# Example for running from source go run . --add-user 'Alice,69' go run . --add-user 'Bob,420'How to find a Profile ID? Navigate to a user's profile on nCore. The URL will be
https://ncore.pro/profile.php?id=12345. TheProfileIDis the number at the end.
How to obtain NICK and PASS
- Open the developer tools in your browser (F12), go to the "Network" tab.
- Log in to nCore using "lower security" mode.
- Find the
login.phprequest in the network activity. - In the response headers, locate the
Set-Cookieheader, which will containnick=andpass=values. - Copy those values and add them to your
.envfile.
Running with Docker Compose
-
Create the following
docker-compose.ymlfile:services: ncore-stats: image: ghcr.io/skidoodle/ncore-stats:main container_name: ncore-stats restart: unless-stopped ports: - "3000:3000" volumes: - ./data:/app/data environment: - NICK=${NICK} - PASS=${PASS} -
Add Users using Docker
When the container is already running, you can use
docker exec:# The executable inside the container is named 'ncore-stats' docker exec ncore-stats ./ncore-stats --add-user 'Charlie,1337' -
Run the Docker Compose setup:
Once you have added your users, start the service.
docker compose up -d -
Open
http://localhost:3000to view your stats.
Updating
To pull the latest image and restart the service:
docker compose pull
docker compose up -d