Scraper for lidarts.org data to CSV. Requested by my friend.
Web scraper for gathering users game history into CSV format files using: node.js
, dotenv
and puppeteer
.
npm install
Create .env
file and provide Your lidarts.org credentials as well as the input file and mode. For defaults see Configuration below.
# .env
# Credentials - required
LOGIN = "Username"
PWD = "Password"
# Input
INPUT_FILE = "input.txt"
# Mode
MODE = "production"
Your lidarts.org credentials. .env is a local environmental file.
Path to input file containing names of users. Usernames must be seperated by comma. Any excessive spaces are trimmed.
# input.txt
doman100, Eghizio
Any string starting with dev
will enable development mode with debug logs and disabling headless mode. Mode is case insensitive.
Run with npm
:
npm start
node app.js
env LOGIN=Username PWD=Password INPUT_FILE=input.txt node app.js
In order to customize the appliction, edit config.js
. You can customize the selectors if they change in the future.
- INPUT_DIR
- OUTPUT_DIR
- MODE
- LOGIN_PAGE
- LOGIN_XPath
- HISTORY_XPath
// config.js
const INPUT_DIR = process.env.INPUT_FILE || "input.txt";
const OUTPUT_DIR = "game_history";
const MODE = process.env.MODE || "production";
This project was created by Jakub "Eghizio" Wąsik and is open source software licensed as MIT.