A web scraping tool that extracts weapon statistics from the Dark Souls III Fandom wiki. The scraper automatically opens Chromium, navigates to the weapon list page, collects all weapon URLs, and then parses each weapon's scaling grades and stat requirements.
This tool automates the process of collecting weapon data from the Dark Souls III wiki. It:
- Launches Chromium browser (for session management)
- Parses the weapon list page to find all individual weapon pages
- Extracts scaling grades (Strength, Dexterity, Intelligence, Faith) from each weapon page
- Extracts stat requirements (Strength, Dexterity, Intelligence, Faith) from each weapon page
- Outputs all collected data to a CSV file for further analysis
- C++26
- libixwebsocket (WebSocket client library)
- OpenSSL (SSL/TLS support)
- libcurl (HTTP client)
- zlib (compression)
- Chromium browser (must be installed and accessible via
chromiumcommand)
Install dependencies on Debian/Ubuntu:
sudo apt install g++ libixwebsocket-dev libssl-dev libcurl4-openssl-dev zlib1g-dev chromiumRun the build script:
./build.shThe script compiles the program with all required dependencies:
g++ main.cpp base64.cpp -std=c++26 -lixwebsocket -lssl -lcrypto -lz -lcurlSimply run the compiled executable:
./a.outThe program will:
- Open Chromium browser automatically
- Wait for the browser to initialize
- Begin scraping the Dark Souls III weapon data
- Display extracted data in the console
- Save all data to
out.csv
The scraper produces out.csv with the following columns:
| Column | Description |
|---|---|
| Strength (req) | Required Strength stat |
| Dexterity (req) | Required Dexterity stat |
| Intelligence (req) | Required Intelligence stat |
| Faith (req) | Required Faith stat |
| Strength (scale) | Strength scaling grade (A-E) |
| Dexterity (scale) | Dexterity scaling grade (A-E) |
| Intelligence (scale) | Intelligence scaling grade (A-E) |
| Faith (scale) | Faith scaling grade (A-E) |
| URL | Weapon page URL |
Site to parse: 50
A E - - 16 18 0 0 https://darksouls.fandom.com/ru/wiki/Longsword
B C - - 10 10 0 0 https://darksouls.fandom.com/ru/wiki/Shortsword
...
The Parser class orchestrates the entire scraping process:
- Domain extraction: Extracts the base domain from URLs
- URL resolution: Converts relative URLs to absolute URLs
- Weapon list parsing: Finds all weapon page links from the main weapons page
- Weapon data parsing: For each weapon page, extracts scaling grades and stat requirements
- CSV export: Writes all collected data to
out.csv
Handles browser automation and HTML retrieval through Chromium. The Scrambler class provides:
- Browser initialization and control
- HTML page retrieval from URLs
- Session management
Provides logging functionality with tag-based filtering for debugging.
The generated CSV file has the following structure:
Requirements,,,,Scale,,,,URL
Strength,Dexterity,Intelligence,Faith,Strength,Dexterity,Intelligence,Faith,http
16,18,0,0,A,E,-,-,https://darksouls.fandom.com/ru/wiki/Longsword
10,10,0,0,B,C,-,-,https://darksouls.fandom.com/ru/wiki/Shortsword
...- The scraper is specifically designed for the Russian Dark Souls III Fandom wiki structure
- Russian scaling characters (А, В, С, Е) are automatically converted to English equivalents (A, B, C, E)
- The program requires an active internet connection
- Chromium must be installed and accessible in the system PATH
- The scraper includes a 1-second delay after launching Chromium to ensure the browser is ready
- The tool uses WebSocket communication for browser control via
ixwebsocket - SSL/TLS is handled through OpenSSL
- HTTP requests are processed via libcurl
- ixwebsocket: WebSocket client for real-time browser communication
- OpenSSL: SSL/TLS encryption for secure connections
- libcurl: HTTP client for fetching web pages
- zlib: Data compression support
MIT