148 Commits
Author SHA1 Message Date
Jylpah d59d677ee1 Update README.md 2024-01-28 21:54:25 +02:00
Jylpah 5082eaa6cf Update 10.4 added 2023-11-19 11:06:51 +02:00
Jylpah 8a6d6176e9 Merge pull request #39 from Jylpah/dev-fix-tankopedia
FIX: Make analyze_replays.py to work on Windows
2023-09-11 21:00:06 +03:00
jylpah d29f092bff remove unused code 2023-09-11 20:53:33 +03:00
jylpah 87d8b9a19d REFACTOR: FileQueue(), use Path for Win compat 2023-09-11 20:53:27 +03:00
Jylpah 06b81d79cb Merge pull request #38 from Jylpah/dev-fix-tankopedia
FIX: JSON search, REAFACTOR: blitzutils.Maps
2023-09-10 23:35:24 +03:00
jylpah de85e95f96 Fix replay search with deep dir trees 2023-09-10 23:33:55 +03:00
jylpah f1a876ea4b update 10.2 2023-09-10 23:33:24 +03:00
jylpah 5628cd4f7e WG(): Use blitzutils.Maps() 2023-09-10 23:33:12 +03:00
Jylpah 76bda7e4e7 Merge pull request #37 from Jylpah/dev-fix-tankopedia
Use new tankopedia format
2023-09-10 20:08:29 +03:00
jylpah b001bb44be remove legacy scripts, use Jylpah/blitz-replays 2023-09-10 20:02:59 +03:00
jylpah 555aa1ae3e Update 10.2, new tankopedia format 2023-09-10 20:01:07 +03:00
jylpah 2a6ee87673 Use blitzutils.WGApiTankopedia() 2023-09-10 20:00:23 +03:00
jylpah c27d7ce4fc rename legacy blitzutils 2023-09-10 19:58:39 +03:00
jylpah 82fa381720 add: blitz-utils 2023-09-10 18:03:46 +03:00
Jylpah da8efce128 Merge pull request #36 from Jylpah/master
Mix fixes
2023-09-10 17:48:11 +03:00
jylpah b5efc4bc9d commit mix fixes 2023-09-10 17:47:13 +03:00
jylpah 859c7aa293 update tanks.json 2023-09-10 17:47:13 +03:00
jylpah b5621991c1 ignore .venv 2023-09-10 17:47:13 +03:00
jylpah b273fcd9f3 sort_dict(): force input to str 2023-09-10 17:47:13 +03:00
Jylpah d4a35e6e8d Whitespace 2023-09-10 17:47:13 +03:00
Jylpah 3f4e9c42d1 FIX Alpenstadt 2023-09-10 17:47:13 +03:00
Jylpah e4f746ca38 Update 9.7 2023-09-10 17:47:13 +03:00
Jylpah ffc006ea05 update 9.6 2023-09-10 17:47:13 +03:00
Jylpah 2b28319271 fix typo 2023-07-09 20:46:11 +03:00
Jylpah 926ef711e7 Updates 10.0 and 10.1 2023-07-09 20:45:55 +03:00
Jylpah 55a1eb65c5 Update 4.10: replays were added 2023-05-01 21:16:44 +03:00
Jylpah 4ca2ad5b69 Update 9.8 2023-05-01 21:14:29 +03:00
Jylpah becc608f0c release 9.7 2023-02-15 14:18:25 +02:00
Jylpah 97e9cf5a54 Add releases 9.4 - 9.6 2023-01-11 00:41:44 +02:00
Jylpah f5e67798b4 get_tank_type(), get_tank_id(): remove async 2022-10-30 15:46:33 +02:00
Jylpah 2eced2eda0 Update 9.3 2022-10-30 15:13:28 +02:00
Jylpah 025a786bdd Merge pull request #35 from Jylpah/dev-fix-wi-rate-limit
Dev fix replays.wotinspector.com rate limit
2022-10-29 22:22:30 +03:00
Jylpah bca474218e WoTinspector.read_replay_id(): added back 2022-10-29 22:21:14 +03:00
Jylpah e48759ce79 ThrottledClientSession(), WoTinspector(): updated 2022-10-29 22:14:33 +03:00
Jylpah 5c694fd721 Typing + remove unsed imports 2022-10-29 22:13:52 +03:00
Jylpah 1f41901042 update 9.2 2022-10-09 00:18:30 +03:00
Jylpah d275914b32 Update .gitignore 2022-08-18 09:44:39 +03:00
Jylpah 9f8c82f434 Stream client support 2022-08-18 09:42:55 +03:00
Jylpah 3a8f065f35 Update 9.2 2022-08-18 09:42:32 +03:00
Jylpah 0cac200f06 Update 9.1 2022-07-14 11:25:38 +03:00
Jylpah 342b90bcf9 SSL -> TLS 2022-06-09 20:48:50 +03:00
Jylpah a9845b6fbb Update 9.0 2022-06-08 17:25:06 +03:00
Jylpah ee36e9192f Update 8.10 2022-04-30 21:43:24 +03:00
Jylpah 5d5821564e update 8.9 2022-03-24 15:44:48 +02:00
Jylpah 3c6f9dcae3 Merge branch 'master' of https://github.com/Jylpah/blitz-tools 2022-03-24 15:41:26 +02:00
Jylpah 433e2295c2 Update 8.9 2022-03-24 15:41:22 +02:00
Jylpah 3dc9533c6a Update maps.json 2022-03-24 15:41:15 +02:00
Jylpah 83456ae150 Add updates 8.5 - 8.8 2022-02-16 17:48:01 +02:00
Jylpah 0c25c781a9 Update 8.8 2022-02-16 17:41:50 +02:00
Jylpah 244ae314d8 Update 8.8 2022-02-16 17:40:17 +02:00
Jylpah 33b0efb48d Update 8.6 2022-01-22 22:27:34 +02:00
Jylpah 574fb95f00 Update 8.6 2021-12-20 10:15:47 +02:00
Jylpah fdc5db966e Update installation and usage instructions 2021-11-24 10:28:32 +02:00
Jylpah 65e4fd83d8 Update installation instructions 2021-11-24 09:48:39 +02:00
Jylpah e9451c7f5d Merge pull request #34 from Jylpah/stable-filters-update2
Fix --filters and improve performance when filtering
2021-11-23 21:42:45 +02:00
Jylpah fa65872ad2 --filters: Bug fix and performance improvement 2021-11-23 21:42:09 +02:00
Jylpah b2f37ebcf5 Merge branch 'stable-filter-update' into stable-filters-update2 2021-11-23 18:44:09 +02:00
Jylpah d323f11662 Update analyze_wotb_replays.py 2021-11-23 18:38:49 +02:00
Jylpah d847a394a9 Add allies/enemies categorizations: xxx_damage_dealt, xxx_wins, process_battle_results(): Fix bug filter(s) 2021-11-23 18:20:11 +02:00
Jylpah 8514e9db17 Update analyze_wotb_replays.py 2021-11-23 18:08:24 +02:00
Jylpah 521986adf1 Update 8.5 2021-11-23 18:01:17 +02:00
Jylpah 7e39fdc442 Fix --filters bug with number categorization 2021-11-23 09:46:04 +02:00
Jylpah 14ee570ee5 Merge branch 'master' of https://github.com/Jylpah/blitz-tools 2021-10-29 21:18:27 +03:00
Jylpah e0228a4bf1 Fix shebang 2021-10-29 21:18:24 +03:00
Jylpah 2a93cfbce3 update 8.4 2021-10-24 21:19:06 +03:00
Jylpah 78a959224c Update 8.4 2021-10-23 22:07:23 +03:00
Jylpah ae24ab35f7 Updates 8.0 - 8.3 added 2021-09-17 10:44:38 +03:00
Jylpah ba6b4781e5 Update 8.3 2021-09-16 17:31:10 +03:00
Jylpah 050bd99488 get_filter_categories(): fix, add room_type=5: Quick Tournament(?) 2021-09-10 21:03:41 +03:00
Jylpah eb39c9ce84 Update 8.2 2021-08-22 21:21:42 +03:00
Jylpah 24547763e9 replayWorker(): Better warning text to incomplete replays 2021-08-13 13:43:17 +03:00
Jylpah 28347e1653 Fix printing of player/allies/enemies average damage columns 2021-08-07 16:42:19 +03:00
Jylpah ffe5afbf1e getTitle(): More robust tank names based on tank_ids, not UsrStrs that keep changing. 2021-08-07 16:40:42 +03:00
Jylpah 17ac09afde Update analyze_wotb_replays.py 2021-08-07 16:26:25 +03:00
Jylpah 9117963085 filter_results() bug fix 2021-08-03 19:14:44 +03:00
Jylpah dc8f9a233d Merge pull request #32 from Jylpah/master-platoon
help_extended(): change order of filter helps
2021-08-03 12:43:59 +03:00
Jylpah ce3f9993c5 help_extended(): change order of filter helps 2021-08-03 12:43:43 +03:00
Jylpah fd7eb8261d Merge pull request #31 from Jylpah/master-platoon
Added platoon rate and categorization by platoon/solo games
2021-08-03 12:43:19 +03:00
Jylpah 748ed7806b Added platoon rate and categorization by platoon/solo games 2021-08-03 12:40:36 +03:00
Jylpah 1ada279728 Update Lupus tanks.json 2021-07-27 18:47:08 +03:00
Jylpah 57cbc5b233 Tanks sorted by tank_id 2021-07-15 20:22:46 +03:00
Jylpah 43842dc140 Update 8.1 2021-07-15 20:21:53 +03:00
Jylpah 170a801652 sort_dict(): added 2021-07-15 20:21:32 +03:00
Jylpah 210e943157 Update 8.0 2021-06-08 16:57:42 +03:00
Jylpah b3b7b81eb4 BattleCategory(): add 'hits_bounced' result field 2021-06-03 15:02:27 +03:00
Jylpah 446e289041 Add --mode dmg_received, improved --mode help, new fields 2021-06-03 14:48:17 +03:00
Jylpah f8a0fdfbe1 Merge pull request #30 from Jylpah/stable-export-replays
Stable export replays
2021-05-12 00:16:42 +03:00
Jylpah 4c0de49077 name2tank_str(): error() -> debug() 2021-05-12 00:05:52 +03:00
Jylpah 07aa7af32f bug fix 2021-05-12 00:04:36 +03:00
Jylpah ea3306ee6c WoTinspector.post_replay(): add _id 2021-05-12 00:04:21 +03:00
Jylpah e4882d70af export replays(): --replays option to export replays 2021-05-11 20:55:13 +03:00
Jylpah 433c26d2f8 get_date_str(), get_replay_filename(): added 2021-05-11 20:54:39 +03:00
Jylpah f6b1b1353f Update analyze_wotb_replays.py 2021-05-11 14:14:10 +03:00
Jylpah 36fb53f0e7 convert_tank_names(): Fix tank key sorting 2021-04-29 00:09:40 +03:00
Jylpah b19a2169a7 Update 7.9 2021-04-29 00:09:04 +03:00
Jylpah 67aeaddf36 get_db_player_stats(): Fix aggregation 2021-04-27 10:26:30 +03:00
Jylpah 763f205175 Update 7.9 2021-04-27 10:24:01 +03:00
Jylpah d97c0cabd8 Update analyze_wotb_replays.py 2021-04-17 14:34:05 +03:00
Jylpah e6ff2f438d save_XXX_stats() funcs 2021-04-17 14:33:59 +03:00
Jylpah f4f153a175 stat_worker(): fix bug introduced in earlier commit 2021-04-15 09:15:00 +03:00
Jylpah 829e03f644 get_db_tank_stats(): optimize find() for index 2021-04-14 21:02:43 +03:00
Jylpah 53b2f62817 mk_readerQ_item(): add _id param 2021-04-09 12:08:14 +03:00
Jylpah 804a4a6483 update 7.8 2021-04-05 15:34:34 +03:00
Jylpah 47a1f96c4e Update 7.8 2021-04-05 14:39:38 +03:00
Jylpah 7a1272c4eb change '{}' to 'dict()' for readability 2021-03-08 21:06:15 +02:00
Jylpah 9601177ff6 main(): fix typo in --filter help text 2021-03-08 15:35:15 +02:00
Jylpah ff4396a3b1 Create export_top_tier_20120228.csv 2021-02-28 13:04:12 +02:00
Jylpah 1aaa197fac Update 7.7 2021-02-28 02:12:14 +02:00
Jylpah abf15c2b35 Update analyze_wotb_replays.py 2021-02-28 01:58:16 +02:00
Jylpah c8e219ab45 Better error handling, change of warning(): 2021-02-28 01:52:43 +02:00
Jylpah c640747a0a PlayerHistogram.print(): fix formatting 2021-02-26 00:11:18 +02:00
Jylpah daf0db7382 PlayerHistogram(): Fix 100x too large percentages 2021-02-25 23:49:22 +02:00
Jylpah 7d46ce46a0 Update 7.7 2021-02-24 18:56:56 +02:00
Jylpah 44d1d6deb9 Merge pull request #27 from Jylpah/stable-extra-fields
add allies_wins, enemies_wins categorization fields
2021-02-22 16:57:01 +02:00
Jylpah 64a520a845 add allies_wins, enemies_wins categorization fields 2021-02-22 16:56:42 +02:00
Jylpah f4f0afec08 extract_tanks(): remove debug 2021-02-16 12:02:31 +02:00
Jylpah 9e05683f98 Fixed tank strings 2021-02-16 11:58:50 +02:00
Jylpah 4ea29439b0 Fix tank string extraction 2021-02-16 11:58:41 +02:00
Jylpah 40c313d408 distance_travelled field and categorization option 2021-02-06 15:46:40 +02:00
Jylpah 3364834f3e Fix odd behavior of battle_duration in replay data 2021-02-06 15:35:40 +02:00
Jylpah 175150b901 --mode extended: remove 'duration' column 2021-02-06 15:32:19 +02:00
Jylpah c18a23258c Merge pull request #24 from Jylpah/master-debug
Fix a string formatting bug.
2021-02-06 15:30:04 +02:00
Jylpah 257ba190c2 Fix a string formatting bug. 2021-02-06 15:29:17 +02:00
Jylpah 970c24072d time_alive, battle_duration categorizations added 2021-02-06 02:48:05 +02:00
Jylpah 111c1801e6 PlayerHistograms:get_results_list(): fix percentage fields 1/100 2021-02-06 02:05:53 +02:00
Jylpah 9f91ef85b6 Merge pull request #23 from Jylpah/stable-csv
CSV export
2021-02-05 21:42:35 +02:00
Jylpah d5cd5f5b12 --CSV: CSV export added 2021-02-05 21:41:50 +02:00
Jylpah 2e1aeea9b8 Update analyze_wotb_replays.py 2021-02-05 19:32:39 +02:00
Jylpah be0e43ad1c --stat_func=tier_x param. Tier X stats as player perf measyre 2021-02-03 23:08:20 +02:00
Jylpah 19bc93405b update help texts, remove unimplemented --output option(?) 2021-02-03 22:51:47 +02:00
Jylpah e567be2b93 Update 7.5 2021-01-31 09:53:23 +02:00
Jylpah ef657ca6cb Update 7.6 2021-01-27 21:13:53 +02:00
Jylpah 1f293872e2 Update shebang to python3
Python version 3.7 or higher required due to asyncio
2021-01-25 09:26:57 +02:00
Jylpah 3e27bd995e Fix: Removed use of private exception classes
removed referenfces to:
- concurrent.futures._base.CancelledError
- asyncio.exceptions.CancelledError
2021-01-18 09:23:41 +02:00
Jylpah c9745fcf5c Fix AMX 50B string 2021-01-04 02:38:05 +02:00
Jylpah 18609cd361 Merge pull request #21 from Jylpah/stable-stat-func
class StatFunc(), title for the type of WR used (in a tank, at tier, career)
2021-01-01 13:19:56 +02:00
Jylpah 4196e0f395 class StatFunc(), titles for WR (tank,tier, player) 2021-01-01 13:19:03 +02:00
Jylpah f1799ff346 Update analyze_wotb_replays.py 2021-01-01 12:22:07 +02:00
Jylpah 383e4c1dac BattleStringCategorization(): fix init 2020-12-29 16:04:49 +02:00
Jylpah 058d3ad88a New categorization: battle, refactor print_headers() 2020-12-29 15:57:19 +02:00
Jylpah 5c19f4f5a6 Merge branch 'master' of https://github.com/Jylpah/blitz-tools 2020-12-28 12:02:45 +02:00
Jylpah 31d9a32de2 reformatting 2020-12-28 12:02:41 +02:00
Jylpah 8adc0aa561 Random -> Regular battles 2020-12-17 10:08:19 +02:00
Jylpah 90f2844749 update 7.5 added 2020-12-17 09:47:17 +02:00
Jylpah fda015abdb Update 7.5 data 2020-12-10 23:50:58 +02:00
Jylpah 99f9d5ee7d Update analyze_wotb_replays.py 2020-12-05 23:17:57 +02:00
Jylpah 2a8b123a83 Uprising mode, --mode help texts 2020-12-05 18:17:44 +02:00
13 changed files with 6578 additions and 8923 deletions

No files matched your search

Executable
+16
View File
@@ -0,0 +1,16 @@
__pycache__/
BlitzApp
tmp/
ssl/
*.ini
*.swp
*.code-workspace
*.sqlite3
.vscode/
*.sqlite3-journal
.gitattributes
export*
*.csv
!/stats/*.csv
!*.py
/.venv
+29 -23
View File
@@ -1,5 +1,9 @@
## Unmaintained
Please use [blitz-replays](https://github.com/Jylpah/blitz-replays) instead. It is faster and more feature-rich.
# blitz-tools
Python scripts to analyze WoT Blitz replays and stats. All the scripts require [Python 3.7](https://www.python.org/downloads/) or higher. I am using 3.8 myself so you may have to change the Python interpreter version in the scripts' first line.
Python scripts to analyze WoT Blitz replays and stats. All the scripts require [Python 3.7](https://www.python.org/downloads/) or later.
### Replays
* [upload_wotb_replays.py](upload_wotb_replays.py): An asynchronous replay uploader.
@@ -13,46 +17,48 @@ Python scripts to analyze WoT Blitz replays and stats. All the scripts require [
* [blitzutils.py](blitzutils.py): A utils class for various Blitz related to functions. *Other scripts use this*, so you need to place it to the same folder with the other scripts
### Data
* [tanks.json](tanks.json): Tankopedia in WG JSON format extracted from the Blitz app files with [extract_tankopedia.py]](extractTankopedia.py]). Contains only limited information required by the scripts.
* [maps.json](maps.json): Blitz map names extracted from the Blitz app files with [extract_tankopedia.py]](extract_tankopedia.py]).
* [tanks.json](tanks.json): Tankopedia in WG JSON format extracted from the Blitz app files with [extract_tankopedia.py](extractTankopedia.py). Contains only limited information required by the scripts.
* [maps.json](maps.json): Blitz map names extracted from the Blitz app files with [extract_tankopedia.py](extract_tankopedia.py).
### Quick instructions
1. Install [Python 3.8](https://www.python.org/downloads/) on to your computer/laptop
2. Install the required Python modules: motor, aiohttp, aioconsole, aiofiles, aiosqlite, beautifulsoup4, lxml, xmltodict, progress
1. Install [Python 3.8](https://www.python.org/downloads/) or later to your computer/laptop
2. Install the required Python modules (see [requirements.txt](requirements.txt): motor, aiohttp, aioconsole, aiofiles, aiosqlite, beautifulsoup4, lxml, xmltodict, progress
```
# Remember to run the command with a Python interpreter >= 3.7
python -m pip install motor aiohttp aioconsole aiofiles aiosqlite beautifulsoup4 lxml xmltodict progress
python -m pip install -r requirements.txt
```
3. Download all the files including the [maps.json](maps.json) and [tanks.json](tanks.json) files. **The recommened way** is to install the scipts via `git clone`: [GitHub Desktop](https://desktop.github.com/) is an excellent GUI for git. This makes it easy to receive the updates via `git pull`.
4. Upload your replays.
3. Clone the repository. [GitHub Desktop](https://desktop.github.com/) is an excellent GUI for `git`. This makes it easy to receive the updates via `git pull`.
```
# Windows, run directly from Command Prompt or Powershell
# Check the options
git clone https://github.com/Jylpah/blitz-tools.git
```
4. Upload your replays with `upload_wotb_replays.py`
```
## Check the options
# Windows Command Prompt or Powershell
python.exe .\upload_wotb_replays.py --help
# Syntax
python.exe .\upload_wotb_replays.py REPLAY_FILE.wotbreplay
# Linux or Windows Subsystem for Linux (WSL)
./upload_wotb_replays.py --help
# Upload replays (Windows)
python.exe .\upload_wotb_replays.py REPLAY_FILE.wotbreplay DIR_WITH_REPLAYS
# example
python.exe .\upload_wotb_replays.py 20200223_0122__jylpah_T-54_grossberg.wotbreplay
# Linux
./upload_wotb_replays.py --help
```
5. Analyze replays.
5. Analyze replays with `analyze_wotb_replays.py`
```
# Windows, run directly from Command Prompt or Powershell
## Check options
# Windows Command Prompt or Powershell
python.exe .\analyze_wotb_replays.py --help
# Syntax
python.exe .\analyze_wotb_replays.py REPLAY_FILE.wotbreplay.json
# Syntax (Windows)
python.exe .\analyze_wotb_replays.py REPLAY_FILE.wotbreplay.json [DIR_WITH_REPLAYS ...]
# Example
# Example (Windows)
python.exe .\analyze_wotb_replays.py 20200223_0122__jylpah_T-54_grossberg.wotbreplay.json
# Linux
# Linux or Windows Subsystem for Linux (WSL)
./analyze_wotb_replays.py --help
```
+3121 -2022
View File
File diff suppressed because it is too large. Load diff
-2013
View File
File diff suppressed because it is too large. Load diff
Executable
+2715
View File
File diff suppressed because it is too large. Load diff
-204
View File
@@ -1,204 +0,0 @@
#!/usr/bin/env python3.8
# Extract tankopedia data in WG API JSON format from Blitz app files (Android APK unzipped)
import sys, argparse, json, os, inspect, aiohttp, asyncio, aiofiles, re, logging, time, xmltodict, collections, configparser
import blitzutils as bu
from blitzutils import WG
logging.getLogger("asyncio").setLevel(logging.DEBUG)
FILE_CONFIG = 'blitzstats.ini'
BLITZAPP_STRINGS='/assets/Data/Strings/en.yaml'
BLITZAPP_VEHICLES_DIR='/assets/Data/XML/item_defs/vehicles/'
BLITZAPP_VEHICLE_FILE='/list.xml'
wg = None
## main() -------------------------------------------------------------
async def main(argv):
global wg
# set the directory for the script
os.chdir(os.path.dirname(sys.argv[0]))
## Read config
BLITZAPP_FOLDER = '.'
try:
if os.path.isfile(FILE_CONFIG):
config = configparser.ConfigParser()
config.read(FILE_CONFIG)
configOptions = config['EXTRACT_TANKOPEDIA']
BLITZAPP_FOLDER = configOptions.get('blitz_app_dir', BLITZAPP_FOLDER)
except:
pass
parser = argparse.ArgumentParser(description='Extract Tankopedia data from Blitz game files')
parser.add_argument('blitz_app_base', type=str, nargs='?', metavar="BLITZAPP_FOLDER", default=BLITZAPP_FOLDER, help='Base dir of the Blitz App files')
parser.add_argument('tanks', type=str, default='tanks.json', nargs='?', metavar="TANKS_FILE", help='File to write Tankopedia')
parser.add_argument('maps', type=str, default='maps.json', nargs='?', metavar='MAPS_FILE', help='File to write map names')
arggroup = parser.add_mutually_exclusive_group()
arggroup.add_argument('-d', '--debug', action='store_true', default=False, help='Debug mode')
arggroup.add_argument('-v', '--verbose', action='store_true', default=False, help='Verbose mode')
arggroup.add_argument('-s', '--silent', action='store_true', default=False, help='Silent mode')
args = parser.parse_args()
bu.set_log_level(args.silent, args.verbose, args.debug)
wg = WG()
tasks = []
for nation in wg.NATION:
tasks.append(asyncio.create_task(extract_tanks(args.blitz_app_base, nation)))
tanklist = []
for tanklist_tmp in await asyncio.gather(*tasks):
tanklist.extend(tanklist_tmp)
tank_strs, map_strs = await read_user_strs(args.blitz_app_base)
json_data = None
userStrs = {}
tanks = {}
if os.path.exists(args.tanks):
try:
async with aiofiles.open(args.tanks) as infile:
json_data = json.loads(await infile.read())
userStrs = json_data['userStr']
tanks = json_data['data']
except Exception as err:
bu.error('Unexpected error when reading file: ' + args.tanks + ' : ' + str(err))
async with aiofiles.open(args.tanks, 'w', encoding="utf8") as outfile:
new_tanks, new_userStrs = await convert_tank_names(tanklist, tank_strs)
# merge old and new tankopedia
tanks.update(new_tanks)
userStrs.update(new_userStrs)
tankopedia = collections.OrderedDict()
tankopedia['status'] = 'ok'
tankopedia['meta'] = { "count": len(tanks) }
tankopedia['data'] = tanks
tankopedia['userStr'] = userStrs
bu.verbose_std('New tankopedia \'' + args.tanks + '\' contains ' + str(len(tanks)) + ' tanks')
await outfile.write(json.dumps(tankopedia, ensure_ascii=False, indent=4, sort_keys=False))
if args.maps != None:
maps = {}
if os.path.exists(args.maps):
try:
async with aiofiles.open(args.maps) as infile:
maps = json.loads(await infile.read())
except Exception as err:
bu.error('Unexpected error when reading file: ' + args.maps + ' : ' + str(err))
# merge old and new map data
maps.update(map_strs)
async with aiofiles.open(args.maps, 'w', encoding="utf8") as outfile:
bu.verbose_std('New maps file \'' + args.maps + '\' contains ' + str(len(maps)) + ' maps')
await outfile.write(json.dumps(maps, ensure_ascii=False, indent=4, sort_keys=True))
return None
async def extract_tanks(blitz_app_base : str, nation: str):
tanks = []
list_xml_file = blitz_app_base + BLITZAPP_VEHICLES_DIR + nation + BLITZAPP_VEHICLE_FILE
if not os.path.isfile(list_xml_file):
print('ERROR: cannot open ' + list_xml_file)
return None
bu.debug('Opening file: ' + list_xml_file + ' (Nation: ' + nation + ')')
async with aiofiles.open(list_xml_file, 'r', encoding="utf8") as f:
try:
tankList = xmltodict.parse(await f.read())
for data in tankList['root'].keys():
tank_xml = tankList['root'][data]
tank = {}
tank['tank_id'] = await get_tank_id(nation, int(tank_xml['id']))
tank['userStr'] = tank_xml['userString']
tank['nation'] = nation
tank['tier'] = int(tank_xml['level'])
#debug(tank_xml['price'])
tank['is_premium'] = issubclass(type(tank_xml['price']), dict)
tank['type'] = await get_tank_type(tank_xml['tags'])
tanks.append(tank)
except Exception as err:
bu.error(err)
sys.exit(2)
return tanks
async def read_user_strs(blitz_app_base : str) -> dict:
"""Read user strings to convert map and tank names"""
tank_strs = {}
map_strs = {}
filename = blitz_app_base + BLITZAPP_STRINGS
bu.debug('Opening file: ' + filename + ' for reading UserStrings')
try:
async with aiofiles.open(filename, 'r', encoding="utf8") as f:
p_tank = re.compile('^"(#\\w+?_vehicles:.+?)": "(.+)"$')
p_map = re.compile('^"#maps:(.+?):.+?: "(.+?)"$')
async for l in f:
m = p_tank.match(l)
if m != None:
tank_strs[m.group(1)] = m.group(2)
m = p_map.match(l)
if m != None and m.group(2) != 'Macragge':
map_strs[m.group(1)] = m.group(2)
except Exception as err:
bu.error(err)
sys.exit(1)
return tank_strs, map_strs
async def convert_tank_names(tanklist : list, tank_strs: dict) -> dict:
"""Convert tank names for Tankopedia"""
tankopedia = {}
userStrs = {}
try:
for tank in tanklist:
tank['name'] = tank_strs[tank['userStr']]
userStrs[tank['userStr'].split(':')[1]] = tank['name']
tank.pop('userStr', None)
tankopedia[str(tank['tank_id'])] = tank
# sorting
tankopedia_sorted = collections.OrderedDict()
for tank_id in sorted(tankopedia.keys(), key=int):
tankopedia_sorted[str(tank_id)] = tankopedia[str(tank_id)]
userStrs_sorted = collections.OrderedDict()
for userStr in sorted(userStrs.keys()):
userStrs_sorted[userStr] = userStrs[userStr]
except Exception as err:
bu.error(err)
sys.exit(1)
return tankopedia_sorted, userStrs_sorted
async def get_tank_id(nation: str, tank_id : int) -> int:
return (tank_id << 8) + (wg.NATION_ID[nation] << 4) + 1
async def get_tank_type(tagstr : str):
tags = tagstr.split(' ')
for t_type in wg.TANK_TYPE:
if tags[0] == t_type:
return t_type
return None
### main()
if __name__ == "__main__":
# To avoid 'Event loop is closed' RuntimeError due to compatibility issue with aiohttp
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
try:
from asyncio import WindowsSelectorEventLoopPolicy
except ImportError:
pass
else:
if not isinstance(asyncio.get_event_loop_policy(), WindowsSelectorEventLoopPolicy):
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
#asyncio.run(main(sys.argv[1:]), debug=True)
asyncio.run(main(sys.argv[1:]))
-91
View File
@@ -1,91 +0,0 @@
#!/usr/local/bin/python3.7
# Get Tankpedia from WoTinspector.com
import sys
import argparse
import json
import os
import inspect
import aiohttp
import asyncio
import re
import logging
from pathlib import Path
import blitzutils as bu
from blitzutils import WG
from blitzutils import WoTinspector
logging.getLogger("asyncio").setLevel(logging.DEBUG)
VERBOSE = False
DEBUG = False
tank_type = ['lightTank', 'mediumTank', 'heavyTank', 'AT-SPG']
# @asyncio.coroutine
async def get_tankopedia(filename: str):
url = "https://wotinspector.com/static/armorinspector/tank_db_blitz.js"
async with aiohttp.ClientSession() as client:
async with client.get(url) as r:
if r.status == 200:
WI_tank_db = await r.text()
WI_tank_db = WI_tank_db.split("\n")
else:
print('Error: Could not get valid HTTPS response. HTTP: ' + str(r.status) )
sys.exit(1)
tanks = {}
n = 0
p = re.compile('\\s*(\\d+):\\s{"en":"([^"]+)",.*?"tier":(\\d+), "type":(\\d), "premium":(\\d).*')
for line in WI_tank_db[1:-1]:
m = p.match(line)
tank = {}
tank['tank_id'] = int(m.group(1))
tank['name'] = m.group(2)
tank['tier'] = int(m.group(3))
tank['type'] = tank_type[int(m.group(4))]
tank['is_premium'] = (int(m.group(5)) == 1)
tanks[str(m.group(1))] = tank
n += 1
tankopedia = {}
tankopedia['status'] = "ok"
tankopedia['meta'] = {"count" : n}
tankopedia['data'] = tanks
print("Tankopedia has " + str(n) + " tanks in: " + filename)
with open(filename,'w') as outfile:
outfile.write(json.dumps(tankopedia, ensure_ascii=False, indent=4, sort_keys=True))
return None
async def main(argv):
# set the directory for the script
os.chdir(os.path.dirname(sys.argv[0]))
parser = argparse.ArgumentParser(description='Retrieve Tankopedia from WoTinspector.com')
parser.add_argument('--file', dest="outfile", help='Write Tankopedia to file')
parser.add_argument('-d', '--debug', action='store_true', default=False, help='Debug mode')
parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Verbose mode')
parser.add_argument('-s', '--silent', action='store_true', default=False, help='Silent mode')
args = parser.parse_args()
bu.set_log_level(args.silent, args.verbose, args.debug)
wi = WoTinspector()
await wi.get_tankopedia(args.outfile)
await wi.close()
# main()
if __name__ == "__main__":
# To avoid 'Event loop is closed' RuntimeError due to compatibility issue with aiohttp
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
try:
from asyncio import WindowsSelectorEventLoopPolicy
except ImportError:
pass
else:
if not isinstance(asyncio.get_event_loop_policy(), WindowsSelectorEventLoopPolicy):
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
asyncio.run(main(sys.argv[1:]), debug=False)
+1 -54
View File
@@ -1,54 +1 @@
{
"Random": "Random map",
"amigosville": "Falls Creek",
"amigosville_02": "Falls Creek - Bridge",
"amigosville_03": "Falls Creek - Factory",
"asia": "Lost Temple",
"canal": "Canal",
"canal_01": "Canal - Factory",
"canyon": "Canyon",
"desert_train": "Desert Sands",
"desert_train_02": "Desert Sands - Town",
"desert_train_03": "Desert Sands - Dunes",
"erlenberg": "Middleburg",
"erlenberg_01": "Middleburg - Town",
"erlenberg_02": "Middleburg - Hill",
"faust": "Faust",
"forgecity": "New Bay",
"fort": "Fort Despair",
"grossberg": "Dynasty's Pearl",
"himmelsdorf": "Himmelsdorf",
"holmeisk": "Wasteland",
"idle": "Yukon",
"italy": "Vineyards",
"karelia": "Rockfield",
"karieri": "Copperfield",
"lake": "Mirage",
"lumber": "Alpenstadt",
"lumber_01": "Alpenstadt - Town",
"malinovka": "Winter Malinovka",
"medvedkovo": "Dead Rail",
"medvedkovo_02": "Dead Rail - Valley",
"medvedkovo_03": "Dead Rail - Railroad",
"milbase": "Yamato Harbor",
"milbase_02": "Yamato Harbor - Battleship",
"milbase_03": "Yamato Harbor - Hills",
"milbase_04": "Yamato Harbor - Center",
"milbase_05": "Yamato Harbor - Dock",
"moon": "Sea of Tranquility",
"mountain": "Black Goldville",
"neptune": "Normandy",
"neptune_01": "Normandy - Hills",
"neptune_02": "Normandy - Beach",
"north": "North",
"ordeal": "Trial by Fire",
"pliego": "Castilla",
"port": "Port Bay",
"rift": "Hellas",
"rock": "Mayan Ruins",
"rudniki": "Mines",
"savanna": "Oasis Palms",
"skit": "Naval Frontier",
"test": "World of Ducks",
"tutorial": "Proving Grounds"
}
{"Random": {"key": "Random", "name": "Random map", "id": -1, "mode": 1}, "amigosville": {"key": "amigosville", "name": "Falls Creek", "id": -1, "mode": 1}, "amigosville_02": {"key": "amigosville_02", "name": "Falls Creek - Bridge", "id": -1, "mode": 3}, "amigosville_03": {"key": "amigosville_03", "name": "Falls Creek - Factory", "id": -1, "mode": 3}, "asia": {"key": "asia", "name": "Lost Temple", "id": -1, "mode": 1}, "canal": {"key": "canal", "name": "Canal", "id": -1, "mode": 1}, "canal_01": {"key": "canal_01", "name": "Canal - Factory", "id": -1, "mode": 3}, "canyon": {"key": "canyon", "name": "Canyon", "id": -1, "mode": 1}, "desert_train": {"key": "desert_train", "name": "Desert Sands", "id": -1, "mode": 1}, "desert_train_02": {"key": "desert_train_02", "name": "Desert Sands - Town", "id": -1, "mode": 3}, "desert_train_03": {"key": "desert_train_03", "name": "Desert Sands - Dunes", "id": -1, "mode": 3}, "erlenberg": {"key": "erlenberg", "name": "Middleburg", "id": -1, "mode": 1}, "erlenberg_01": {"key": "erlenberg_01", "name": "Middleburg - Town", "id": -1, "mode": 3}, "erlenberg_02": {"key": "erlenberg_02", "name": "Middleburg - Hill", "id": -1, "mode": 3}, "faust": {"key": "faust", "name": "Faust", "id": -1, "mode": 1}, "forgecity": {"key": "forgecity", "name": "New Bay", "id": -1, "mode": 1}, "fort": {"key": "fort", "name": "Fort Despair", "id": -1, "mode": 1}, "grossberg": {"key": "grossberg", "name": "Dynasty's Pearl", "id": -1, "mode": 1}, "himmelsdorf": {"key": "himmelsdorf", "name": "Himmelsdorf", "id": -1, "mode": 1}, "holland": {"key": "holland", "name": "Molendijk", "id": -1, "mode": 1}, "holmeisk": {"key": "holmeisk", "name": "Wasteland", "id": -1, "mode": 1}, "iceworld": {"key": "iceworld", "name": "Everfrost", "id": -1, "mode": 2}, "idle": {"key": "idle", "name": "Yukon", "id": -1, "mode": 1}, "italy": {"key": "italy", "name": "Vineyards", "id": -1, "mode": 1}, "karelia": {"key": "karelia", "name": "Rockfield", "id": -1, "mode": 1}, "karieri": {"key": "karieri", "name": "Copperfield", "id": -1, "mode": 1}, "lake": {"key": "lake", "name": "Mirage", "id": -1, "mode": 1}, "lumber": {"key": "lumber", "name": "Horrorstadt", "id": -1, "mode": 1}, "lumber_01": {"key": "lumber_01", "name": "Alpenstadt - Town", "id": -1, "mode": 3}, "malinovka": {"key": "malinovka", "name": "Winter Malinovka", "id": -1, "mode": 1}, "medvedkovo": {"key": "medvedkovo", "name": "Dead Rail", "id": -1, "mode": 1}, "medvedkovo_02": {"key": "medvedkovo_02", "name": "Dead Rail - Valley", "id": -1, "mode": 3}, "medvedkovo_03": {"key": "medvedkovo_03", "name": "Dead Rail - Railroad", "id": -1, "mode": 3}, "milbase": {"key": "milbase", "name": "Yamato Harbor", "id": -1, "mode": 1}, "milbase_02": {"key": "milbase_02", "name": "Yamato Harbor - Battleship", "id": -1, "mode": 3}, "milbase_03": {"key": "milbase_03", "name": "Yamato Harbor - Hills", "id": -1, "mode": 3}, "milbase_04": {"key": "milbase_04", "name": "Yamato Harbor - Center", "id": -1, "mode": 3}, "milbase_05": {"key": "milbase_05", "name": "Yamato Harbor - Dock", "id": -1, "mode": 3}, "moon": {"key": "moon", "name": "Sea of Tranquility", "id": -1, "mode": 2}, "mountain": {"key": "mountain", "name": "Black Goldville", "id": -1, "mode": 1}, "neptune": {"key": "neptune", "name": "Normandy", "id": -1, "mode": 1}, "neptune_01": {"key": "neptune_01", "name": "Normandy - Hills", "id": -1, "mode": 3}, "neptune_02": {"key": "neptune_02", "name": "Normandy - Beach", "id": -1, "mode": 3}, "north": {"key": "north", "name": "North", "id": -1, "mode": 1}, "ordeal": {"key": "ordeal", "name": "Trial by Fire", "id": -1, "mode": 1}, "plant": {"key": "plant", "name": "Ghost Factory", "id": -1, "mode": 1}, "pliego": {"key": "pliego", "name": "Castilla", "id": -1, "mode": 1}, "port": {"key": "port", "name": "Port Bay", "id": -1, "mode": 1}, "rift": {"key": "rift", "name": "Hellas", "id": -1, "mode": 1}, "rock": {"key": "rock", "name": "Mayan Ruins", "id": -1, "mode": 1}, "rudniki": {"key": "rudniki", "name": "Mines", "id": -1, "mode": 1}, "rudniki_01": {"key": "rudniki_01", "name": "Mines - Hill", "id": -1, "mode": 3}, "rudniki_02": {"key": "rudniki_02", "name": "Mines - Village", "id": -1, "mode": 3}, "rudniki_03": {"key": "rudniki_03", "name": "Mines - Center", "id": -1, "mode": 3}, "savanna": {"key": "savanna", "name": "Oasis Palms", "id": -1, "mode": 1}, "skit": {"key": "skit", "name": "Naval Frontier", "id": -1, "mode": 1}, "test": {"key": "test", "name": "World of Ducks", "id": -1, "mode": 2}, "tutorial": {"key": "tutorial", "name": "Proving Grounds", "id": -1, "mode": 0}}
+106 -76
View File
@@ -1,78 +1,108 @@
# WoT Blitz releases
| Release | Date | Notes | Inaccurate? |
|:-------:|:--------:|-------------|-----|
| 7.4 | 2020-11-12 | TD buffs, Clan missions | |
| 7.3 | 2020-10-08 | Swedish HT line | |
| 7.2 | 2020-08-19 | Balance changes, added tier X ammo capa, new aiming reticles | |
| 7.1 | 2020-07-15 | New Yukon map, IS-6, KV-4, Patton 48 armor buff, Grille DPM buff, SP IC, AMZ 13 75, M41 Bulldog mobility buff | |
| 7.0 | 2020-06-17 | British LTs, graphics improvements, ATGM nerf, Sheridan nerf, map fixes | |
| 6.10 | 2020-04-29 | T92E1 nerf, Tier V-IX heavy HP buff, Battle Pass, map fixes | |
| 6.9 | 2020-03-25 | Japanese TDs, Tier X heavy HP buff | |
| 6.8 | 2020-02-19 | ATGM nerf, Hellas map | |
| 6.7 | 2020-01-15 | ATGM US Lights | |
| 6.6 | 2019-12-18 | T-62A + Leo buffs | |
| 6.5 | 2019-11-21 | New UI | |
| 6.4 | 2019-10-16 | Halloween map, mid-tier HT buff... | |
| 6.3 | 2019-09-18 | European line | |
| 6.2 | 2019-08-14 | New MM | |
| 6.1 | 2019-07-10 | Autoloader buff | |
| 6.0 | 2019-06-05 | UK TD line #2 | |
| 5.10 | 2019-04-24 | new missions | |
| 5.9 | 2019-03-27 | New shell tracers, minor fixes | |
| 5.8 | 2019-02-21 | Chinese TD line | |
| 5.7 | 2019-01-16 | Avatars | |
| 5.6 | 2018-12-05 | Normandy map | |
| 5.5 | 2018-11-13 | Low-tier clean-up | |
| 5.4 | 2018-10-10 | MM "rigging" adjusted | |
| 5.3 | 2018-09-12 | MM "rigging" started, Newbie queue added | |
| 5.2 | 2018-08-22 | Faust map | |
| 5.1 | 2018-07-31 | New MM: vehicle class matching | |
| 5.0 | 2018-06-30 | Vineyeards map update, Spare Parts killed | |
| 4.10 | 2018-05-24 | Alpenstadt map | |
| 4.9 | 2018-04-25 | Chinese heavy tanks | |
| 4.8 | 2018-03-28 | Choice of battle modes, crew skills accelerator | |
| 4.7 | 2018-02-28 | New minimap | |
| 4.6 | 2018-01-31 | Chinese nation | |
| 4.5 | 2017-12-19 | Dynasty's Pearl map | |
| 4.4 | 2017-11-09 | New British tanks | |
| 4.3 | 2017-10-10 | Level 7 screw skills | |
| 4.2 | 2017-09-12 | French LTs, Naval Frontier map | |
| 4.1 | 2017-08-16 | New markers | |
| 4.0 | 2017-07-13 | Rating battles | Y |
| 3.10 | 2017-06-15 | Fixes | Y |
| 3.9 | 2017-05-19 | Military Honor, Mayan Ruins | Y |
| 3.8 | 2017-04-24 | Spare Parts, New 9-slot Equipment system | Y |
| 3.7 | 2017-03-22 | Balance changes, Tournaments | Y |
| 3.6 | 2017-02-16 | Vehicle Enrichment | Y |
| 3.5 | 2017-01-13 | Boosters, Dead rail update | Y |
| 3.4 | 2016-11-28 | Canyon map, USA T57 line | |
| 3.3 | 2016-11-01 | Updated Mines map | |
| 3.2 | 2016-10-04 | Copperfield update | |
| 3.1 | 2016-09-03 | Clan tournaments, Yamato Harbor map | Y |
| 3.0 | 2016-07-20 | Supremacy mode, Falls Creek update | Y |
| 2.11 | 2016-06-28 | Vineyeards map, Oasis Palms update, German paper TDs | |
| 2.10 | 2016-06-07 | Rockfield map update, Tank birthdays, high-pen gun for IS-6 | |
| 2.9 | 2016-05-03 | Training rooms, +/-1 Matchmaker | Y |
| 2.8 | 2016-04-04 | New Russian TD line, new consumables system | Y |
| 2.7 | 2016-03-07 | Mirage map | Y |
| 2.6 | 2016-02-10 | German LTs, shooting through obstacles | Y |
| 2.5 | 2016-01-11 | Camouflages, Clan supply | Y |
| 2.4 | 2015-12-09 | Additional Japanese tanks, windows version | Y |
| 2.3 | 2015-11-12 | Canal map | Y |
| 2.2 | 2015-10-05 | Desert Sands map update | Y |
| 2.1 | 2015-09-07 | UK TDs, Clan Chat | Y |
| 2.0 | 2015-08-05 | Clans, Oasis Palms updated | |
| 1.11 | 2015-07-13 | KV-2, KV-13, Sherman Jumbo | Y |
| 1.10 | 2015-06-11 | Port Bay map | Y |
| 1.9 | 2015-05-13 | New German medium tanks (Leo) | Y |
| 1.8 | 2015-04-14 | Game tutorial, Bot map for new players | Y |
| 1.7 | 2015-02-16 | US Turreted TDs | Y |
| 1.6 | 2015-01-19 | Castilla map, UK HT line | Y |
| 1.5 | 2014-12-01 | UK Nation | Y |
| 1.4 | 2014-10-29 | German HT line (Maus) | Y |
| 1.3 | 2014-10-02 | USSR IS-4 line, Lost Temple, Black Goldville maps | Y |
| 1.2 | 2014-08-20 | Oasis Palms map | Y |
| 1.1.1 | 2014-07-23 | Fixes :-) | |
| 1.0 | 2014-06-26 | Worldwide launch | |
| 0.9 | 2014-05-05 | Nordic soft launch | |
| Release | Date | Content updates |
|:-------:|:--------:|-------------|
| 10.4 | 2023-11-15 | Threesome-platoons for fun modes, camos |
| 10.3 | 2023-09-27 | Polish Medium Tanks, Tier X rebalance, map updates: Ghost Factory, Desert Sands, Super-cool legenday camos|
| 10.2 | 2023-08-16 | PBR Camos and bug fixes ... |
| 10.1 | 2023-07-05 | PBR Camos and ? |
| 10.0 | 2023-05-24 | Lagoon map, Czechoslovakian heavies, tanks start shells loaded |
| 9.8 | 2023-03-22 | F\*cked up The Quick Commands Wheel, camos |
| 9.7 | 2023-02-15 | Chinese light tanks |
| 9.6 | 2023-01-11 | Finally fixing game sounds for players with Genelec studio monitors, more gold camos |
| 9.5 | 2022-12-14 | Camos and ?|
| 9.4 | 2022-11-09 | Italian TD line |
| 9.3 | 2022-10-04 | Nothing, except legandary camos and utterly incomprehensible shell icons |
| 9.2 | 2022-08-17 | New shot sounds and shell hit marks, vehicle restoration from the game client |
| 9.1 | 2022-07-14 | Releases updated via DLC, graphics updates for Object 140, Patton 46 |
| 9.0 | 2022-06-08 | Japanies heavies, Castilla graphics update, new garage |
| 8.10 | 2022-04-28 | New battle results screen, new "Operation" mechanics |
| 8.9 | 2022-03-23 | "Free" camo resupply, VK 72.01 supplies |
| 8.8 | 2022-02-16 | Molendijk map |
| 8.7 | 2022-01-19 | Soviet Light Tanks |
| 8.6 | 2021-12-15 | Joining Light and Medium Tank classes in MM |
| 8.5 | 2021-11-17 | New national crew voices, economy update |
| 8.4 | 2021-10-20 | Polish heavy tanks |
| 8.3 | 2021-09-16 | FV4005, FV4022, VK 91.01 (P) and WZ-121 legendary camos, -5 deg gun depression to WZ-120 |
| 8.2 | 2021-08-18 | Ghost Factory map, XP/credits nerf for inactive players, new store UI |
| 8.1 | 2021-07-15 | Armor highlighting updated |
| 8.0 | 2021-06-08 | American experimental heavies (Yoh-line), PBR camos |
| 7.9 | 2021-04-27 | Mines rework, new tutorial, colorblind mode, JgPz E100 legendary camo |
| 7.8 | 2021-03-24 | Mid-tier balance changes, Grille line new consumables |
| 7.7 | 2021-02-24 | Czechoslovakian medium tanks |
| 7.6 | 2021-01-27 | AMC 13 90, TOG II buffs, free replay camera |
| 7.5 | 2020-12-09 | ATGM removal, Batchat, Kpz70, T-2020 buff |
| 7.4 | 2020-11-12 | TD buffs, Clan missions |
| 7.3 | 2020-10-08 | Swedish HT line |
| 7.2 | 2020-08-19 | Balance changes, added tier X ammo capa, new aiming reticles |
| 7.1 | 2020-07-15 | New Yukon map, IS-6, KV-4, Patton 48 armor buff, Grille DPM buff, SP IC, AMZ 13 75, M41 Bulldog mobility buff |
| 7.0 | 2020-06-17 | British LTs, graphics improvements, ATGM nerf, Sheridan nerf, map fixes |
| 6.10 | 2020-04-29 | T92E1 nerf, Tier V-IX heavy HP buff, Battle Pass, map fixes |
| 6.9 | 2020-03-25 | Japanese TDs, Tier X heavy HP buff |
| 6.8 | 2020-02-19 | ATGM nerf, Hellas map |
| 6.7 | 2020-01-15 | ATGM US Lights |
| 6.6 | 2019-12-18 | T-62A + Leo buffs |
| 6.5 | 2019-11-21 | New UI |
| 6.4 | 2019-10-16 | Halloween map, mid-tier HT buff... |
| 6.3 | 2019-09-18 | European line |
| 6.2 | 2019-08-14 | New MM |
| 6.1 | 2019-07-10 | Autoloader buff |
| 6.0 | 2019-06-05 | UK TD line #2 |
| 5.10 | 2019-04-24 | new missions |
| 5.9 | 2019-03-27 | New shell tracers, minor fixes |
| 5.8 | 2019-02-21 | Chinese TD line |
| 5.7 | 2019-01-16 | Avatars |
| 5.6 | 2018-12-05 | Normandy map |
| 5.5 | 2018-11-13 | Low-tier clean-up :-( |
| 5.4 | 2018-10-10 | MM "rigging" adjusted |
| 5.3 | 2018-09-12 | MM "rigging" started, Newbie queue added |
| 5.2 | 2018-08-22 | Faust map |
| 5.1 | 2018-07-31 | New MM: vehicle class matching |
| 5.0 | 2018-06-30 | Vineyeards map update, Spare Parts removed ! |
| 4.10 | 2018-05-24 | Replays, Alpenstadt map |
| 4.9 | 2018-04-25 | Chinese heavy tanks |
| 4.8 | 2018-03-28 | Choice of battle modes, crew skills accelerator |
| 4.7 | 2018-02-28 | New minimap |
| 4.6 | 2018-01-31 | Chinese nation |
| 4.5 | 2017-12-19 | Dynasty's Pearl map |
| 4.4 | 2017-11-09 | New British tanks |
| 4.3 | 2017-10-10 | Level 7 screw skills |
| 4.2 | 2017-09-12 | French LTs, Naval Frontier map |
| 4.1 | 2017-08-16 | New markers |
| 4.0 | 2017-07-13 | Rating battles (date uncertain) |
| 3.10 | 2017-06-15 | Fixes (date uncertain) |
| 3.9 | 2017-05-19 | Military Honor, Mayan Ruins (date uncertain) |
| 3.8 | 2017-04-24 | Spare Parts, New 9-slot Equipment system (date uncertain) |
| 3.7 | 2017-03-22 | Balance changes, Tournaments (date uncertain) |
| 3.6 | 2017-02-16 | Vehicle Enrichment (date uncertain) |
| 3.5 | 2017-01-13 | Boosters, Dead rail update (date uncertain) |
| 3.4 | 2016-11-28 | Canyon map, USA T57 line |
| 3.3 | 2016-11-01 | Updated Mines map |
| 3.2 | 2016-10-04 | Copperfield update |
| 3.1 | 2016-09-03 | Clan tournaments, Yamato Harbor map (date uncertain) |
| 3.0 | 2016-07-20 | Supremacy mode, Falls Creek update (date uncertain) |
| 2.11 | 2016-06-28 | Vineyeards map, Oasis Palms update, German paper TDs |
| 2.10 | 2016-06-07 | Rockfield map update, Tank birthdays, high-pen gun for IS-6 |
| 2.9 | 2016-05-03 | Training rooms, +/-1 Matchmaker (date uncertain) |
| 2.8 | 2016-04-04 | New Russian TD line, new consumables system (date uncertain) |
| 2.7 | 2016-03-07 | Mirage map (date uncertain) |
| 2.6 | 2016-02-10 | German LTs, shooting through obstacles (date uncertain) |
| 2.5 | 2016-01-11 | Camouflages, Clan supply (date uncertain) |
| 2.4 | 2015-12-09 | Additional Japanese tanks, windows version (date uncertain) |
| 2.3 | 2015-11-12 | Canal map (date uncertain) |
| 2.2 | 2015-10-05 | Desert Sands map update (date uncertain) |
| 2.1 | 2015-09-07 | UK TDs, Clan Chat (date uncertain) |
| 2.0 | 2015-08-05 | Clans, Oasis Palms updated |
| 1.11 | 2015-07-13 | KV-2, KV-13, Sherman Jumbo (date uncertain) |
| 1.10 | 2015-06-11 | Port Bay map (date uncertain) |
| 1.9 | 2015-05-13 | New German medium tanks (Leo) (date uncertain) |
| 1.8 | 2015-04-14 | Game tutorial, Bot map for new players (date uncertain) |
| 1.7 | 2015-02-16 | US Turreted TDs (date uncertain) |
| 1.6 | 2015-01-19 | Castilla map, UK HT line (date uncertain) |
| 1.5 | 2014-12-01 | UK Nation (date uncertain) |
| 1.4 | 2014-10-29 | German HT line (Maus) (date uncertain) |
| 1.3 | 2014-10-02 | USSR IS-4 line, Lost Temple, Black Goldville maps (date uncertain) |
| 1.2 | 2014-08-20 | Oasis Palms map (date uncertain) |
| 1.1.1 | 2014-07-23 | Fixes :-) |
| 1.0 | 2014-06-26 | Worldwide launch |
| 0.9 | 2014-05-05 | Nordic soft launch |
+2 -1
View File
@@ -7,4 +7,5 @@ beautifulsoup4
lxml
xmltodict
progress
pytest-asyncio
pytest-asyncio
blitz-utils @ git+https://github.com/Jylpah/blitz-utils
+172
View File
@@ -0,0 +1,172 @@
,TOTAL,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,Total,6942,100%,71.80%,2058,1.86,1.4,64%,2.3,5.4,86.10%,90.80%,65.30%,90%,57.08%,50.15%,50.12%,0.20%
,,,,,,,,,,,,,,,,,,
,Result,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,Loss,1959,28%,0.00%,1715,1.12,1.3,61%,1.3,1.3,84.70%,88.60%,13.40%,78%,56.47%,49.56%,50.92%,0.10%
,Win,4983,72%,100.00%,2193,2.16,1.4,65%,3,15.1,86.50%,91.40%,85.70%,95%,57.32%,50.39%,49.80%,0.20%
,,,,,,,,,,,,,,,,,,
,Battle Type,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,Encounter,4652,67%,73.00%,1969,1.98,1.4,67%,2.5,6,85.70%,90.70%,66.80%,91%,57.43%,50.41%,50.33%,0.30%
,Supremacy,2290,33%,69.30%,2238,1.63,1.2,60%,2,4.3,87.10%,91.20%,62.20%,89%,56.37%,49.63%,49.69%,0.00%
,,,,,,,,,,,,,,,,,,
,Tier,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,Bottom tier,2480,36%,69.50%,1750,1.53,1.2,0%,2.2,3.9,85.40%,89.20%,60.70%,88%,56.91%,50.13%,49.99%,0.10%
,Top tier,4462,64%,73.10%,2229,2.05,1.5,100%,2.4,6.4,86.50%,91.60%,67.90%,91%,57.18%,50.16%,50.19%,0.20%
,,,,,,,,,,,,,,,,,,
,Tank Tier,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,1,89,1%,80.90%,678,1.89,1.9,40%,3,7.6,86.20%,91.80%,75.30%,95%,55.40%,48.80%,48.40%,0.00%
,2,180,3%,77.80%,970,2.64,1.6,73%,3.3,9.1,82.90%,90.60%,71.10%,93%,56.04%,49.36%,49.46%,0.90%
,3,540,8%,75.70%,1099,2.15,1.4,36%,3.1,7,83.60%,90.00%,69.10%,93%,57.55%,51.15%,50.16%,1.90%
,4,628,9%,75.20%,1256,2.21,1.3,73%,3.1,7.4,85.00%,91.60%,70.20%,94%,55.72%,51.76%,51.65%,0.00%
,5,626,9%,80.20%,1503,2.29,1.3,71%,3.2,8.3,86.90%,89.50%,72.20%,93%,55.69%,50.38%,49.95%,0.00%
,6,1064,15%,74.20%,1801,1.97,1.4,62%,2.4,5.8,86.70%,92.20%,65.90%,90%,56.82%,49.24%,49.31%,0.00%
,7,1141,16%,71.80%,2143,1.69,1.3,50%,2.5,4.9,85.70%,90.10%,65.80%,90%,58.48%,49.62%,49.60%,0.00%
,8,1222,18%,68.20%,2371,1.59,1.4,67%,2.1,4.2,87.40%,90.90%,61.80%,89%,56.84%,49.80%,49.99%,0.00%
,9,598,9%,64.70%,2806,1.61,1.2,49%,2.1,4,89.10%,91.90%,59.50%,87%,56.58%,50.13%,50.32%,0.00%
,10,854,12%,65.60%,3270,1.62,1.5,100%,2,4,88.30%,90.20%,59.60%,88%,58.37%,50.83%,51.16%,0.00%
,,,,,,,,,,,,,,,,,,
,Tank Class,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,Light Tank,1337,19%,74.40%,1589,1.88,1.9,59%,2.3,5.9,83.70%,89.20%,68.40%,90%,57.15%,50.20%,49.90%,0.70%
,Medium Tank,1957,28%,73.10%,2181,1.99,1.7,67%,2.4,5.9,88.20%,91.40%,66.40%,90%,57.23%,50.26%,50.12%,0.10%
,Heavy Tank,2032,29%,70.00%,2180,1.75,1.2,70%,1.9,5,87.20%,90.70%,65.20%,91%,56.72%,50.16%,50.23%,0.00%
,Tank Destroyer,1616,23%,70.30%,2144,1.84,0.7,59%,3,4.8,85.10%,92.60%,61.50%,91%,57.31%,49.98%,50.16%,0.00%
,,,,,,,,,,,,,,,,,,
,Player WR,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
,35 - 45%,80,1%,43.80%,1255,0.93,1,55%,1.1,1.5,84.00%,87.10%,37.50%,82%,44.52%,49.84%,51.14%,0.00%
,45 - 50%,584,8%,69.20%,1397,1.46,1.1,62%,1.8,3.8,81.20%,87.40%,61.30%,89%,47.86%,49.84%,49.86%,0.00%
,50 - 55%,1970,28%,69.00%,1861,1.73,1.3,63%,2.1,4.3,85.40%,90.20%,60.20%,88%,53.06%,50.10%,49.99%,0.00%
,55 - 65%,3677,53%,73.50%,2249,2.01,1.4,66%,2.5,6.3,87.50%,91.50%,68.10%,92%,58.78%,50.13%,50.14%,0.00%
,65 - %,631,9%,76.40%,2274,1.95,1.4,61%,2.8,7,84.60%,91.40%,72.10%,91%,69.92%,50.79%,50.51%,1.90%
,,,,,,,,,,,,,,,,,,
,Player Hit Rate,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
, 0 - 25%,32,0%,43.80%,1,0,1.6,47%,0,0,0.00%, inf%,25.00%,57%,54.55%,50.15%,51.14%,0.00%
,25 - 50%,47,1%,44.70%,693,0.34,1.3,51%,0.6,0.5,38.70%,90.50%,36.20%,77%,55.05%,50.14%,51.15%,0.00%
,50 - 60%,172,2%,56.40%,876,0.6,1.2,58%,0.8,1.1,54.70%,87.80%,44.80%,81%,56.38%,50.61%,50.48%,0.00%
,60 - 70%,461,7%,58.80%,1254,1.08,1.2,61%,1.4,2.4,65.40%,87.70%,54.20%,87%,56.29%,50.18%,50.50%,0.00%
,70 - 80%,941,14%,70.50%,1691,1.59,1.3,63%,2,4.6,75.50%,89.10%,65.70%,91%,56.92%,50.36%,50.24%,0.00%
,80 - 90%,2091,30%,74.00%,2071,1.98,1.4,66%,2.5,6.3,85.00%,90.60%,68.50%,93%,57.00%,50.10%,50.08%,0.10%
,90 - 95%,1258,18%,81.00%,2561,2.52,1.5,66%,3.3,11,92.30%,92.00%,77.10%,96%,57.73%,50.08%,49.85%,0.30%
,95 - %,1940,28%,69.60%,2259,1.82,1.4,64%,2.2,4.5,99.00%,91.70%,59.80%,86%,57.17%,50.12%,50.11%,0.40%
,,,,,,,,,,,,,,,,,,
,Player Pen Rate,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
, 0 - 25%,49,1%,38.80%,6,0,1.5,39%,0,0,45.80%,10.50%,22.40%,56%,55.11%,49.96%,50.47%,0.00%
,25 - 50%,43,1%,30.20%,447,0.19,1.7,44%,0.3,0.2,82.30%,38.40%,20.90%,66%,55.41%,50.75%,51.06%,0.00%
,50 - 60%,110,2%,41.80%,642,0.27,1.5,60%,0.5,0.4,77.50%,53.10%,32.70%,70%,54.44%,50.46%,50.61%,0.00%
,60 - 70%,210,3%,52.40%,1085,0.63,1.3,56%,0.9,1.1,81.00%,65.10%,40.00%,79%,55.71%,50.58%,50.39%,0.00%
,70 - 80%,469,7%,65.00%,1669,1.33,1.4,61%,1.6,3.1,83.50%,75.40%,57.60%,89%,56.39%,50.24%,50.30%,0.00%
,80 - 90%,1544,22%,71.60%,2076,1.86,1.4,61%,2.3,5.5,86.00%,85.30%,66.30%,92%,57.35%,50.17%,50.03%,0.20%
,90 - 95%,1210,17%,79.30%,2509,2.53,1.5,66%,3.3,11,87.80%,92.40%,77.00%,96%,57.57%,50.00%,50.09%,0.20%
,95 - %,3307,48%,73.30%,2100,1.88,1.3,67%,2.4,5.5,86.30%,99.30%,65.60%,90%,57.11%,50.14%,50.10%,0.20%
,,,,,,,,,,,,,,,,,,
Server,account_id_anon,Battles,% Battles,WR,DPB,KPB,Spot,Top tier,DR,KDR,Hit rate,Pen rate,Surv%,Share live,Player WR,Allies WR,Enemies WR,No stats
RU,1,33,0%,78.80%,3112,1.91,1.6,67%,2.5,7.9,89.60%,90.20%,75.80%,87%,71.43%,50.74%,51.07%,0.00%
RU,2,23,0%,87.00%,3525,2.78,1.7,74%,4.3,32,90.40%,94.40%,91.30%,100%,59.39%,48.07%,48.75%,0.00%
RU,3,81,1%,66.70%,1927,1.47,1,75%,1.9,3.1,82.30%,89.60%,53.10%,86%,69.59%,50.23%,50.85%,0.00%
EU,4,26,0%,80.80%,4082,2.62,1.2,62%,4.1,17,91.10%,93.80%,84.60%,98%,53.92%,48.75%,49.31%,0.00%
EU,5,79,1%,59.50%,1920,0.97,1.4,75%,1.4,2,80.20%,87.10%,50.60%,84%,59.06%,50.12%,51.22%,0.00%
EU,6,92,1%,60.90%,1685,0.99,1.5,65%,1.3,1.8,87.80%,88.50%,45.70%,83%,57.79%,50.30%,50.77%,0.00%
EU,7,50,1%,78.00%,2787,2.92,1.9,52%,4,16.2,90.60%,92.70%,82.00%,99%,64.87%,50.49%,50.50%,0.00%
EU,8,69,1%,60.90%,1695,1.48,1.9,55%,1.5,3,87.80%,92.10%,50.70%,77%,54.73%,50.06%,49.81%,0.10%
EU,9,33,0%,63.60%,1529,1.55,1.9,64%,2,3.6,82.10%,91.30%,57.60%,85%,52.48%,49.85%,50.92%,0.00%
EU,10,22,0%,90.90%,2990,3.82,1,59%,3.6,42,85.60%,93.00%,90.90%,100%,57.27%,48.97%,49.67%,0.00%
EU,11,35,1%,62.90%,1197,0.97,1.1,66%,1.3,2,85.20%,88.10%,51.40%,81%,55.89%,50.71%,49.97%,0.00%
EU,12,20,0%,95.00%,4854,3.95,1.2,25%,4.9,79,94.40%,95.60%,95.00%,99%,56.71%,49.15%,49.81%,0.00%
EU,13,80,1%,73.80%,2228,2.65,1.4,69%,3.3,8.5,92.10%,92.70%,68.80%,95%,58.83%,49.43%,49.21%,0.00%
EU,14,30,0%,83.30%,2167,3.93,2,63%,4.2,19.7,87.90%,92.00%,80.00%,98%,62.43%,50.39%,49.69%,0.00%
EU,15,305,4%,55.40%,2126,1.21,1.3,78%,1.6,2.4,85.80%,90.90%,49.50%,87%,58.91%,50.46%,50.47%,0.00%
EU,16,49,1%,69.40%,2362,2.47,1.5,43%,4,7.1,90.20%,93.30%,65.30%,94%,62.94%,49.43%,49.50%,0.00%
EU,17,22,0%,86.40%,1898,4.41,1.4,95%,4.8,48.5,90.60%,94.80%,90.90%,100%,57.61%,48.11%,49.25%,0.00%
EU,18,96,1%,76.00%,1764,2.19,0.9,67%,3.2,7.2,89.40%,95.00%,69.80%,94%,56.39%,50.00%,49.58%,0.00%
EU,19,23,0%,95.70%,1997,2.09,1.3,65%,3.8,16,90.70%,94.20%,87.00%,98%,70.96%,48.51%,49.66%,0.00%
EU,20,256,4%,54.30%,1081,0.58,1.5,55%,0.9,0.8,81.10%,83.80%,28.10%,68%,52.29%,50.31%,49.81%,0.00%
EU,21,73,1%,82.20%,1025,1.9,1.5,55%,2.7,6.3,84.20%,92.30%,69.90%,94%,58.95%,51.61%,50.45%,0.00%
EU,22,53,1%,79.20%,1415,1.98,0.9,47%,3.2,7,87.40%,90.40%,71.70%,95%,57.15%,50.10%,49.76%,0.00%
EU,23,70,1%,81.40%,2224,2.5,1.8,47%,4,9.7,89.20%,90.20%,74.30%,96%,61.99%,50.85%,50.17%,0.00%
EU,24,83,1%,73.50%,3049,2.1,2,73%,3.2,7.2,89.60%,91.70%,71.10%,96%,60.48%,49.78%,49.51%,0.00%
EU,25,127,2%,68.50%,1609,1.86,1.3,52%,2.4,4.5,83.40%,89.50%,59.10%,89%,54.64%,49.76%,49.35%,0.00%
EU,26,52,1%,80.80%,2669,2.62,2.2,50%,3,11.3,87.80%,91.00%,76.90%,95%,62.66%,49.60%,49.65%,0.20%
EU,27,30,0%,86.70%,4246,3.17,1.4,57%,3.6,23.8,88.10%,95.30%,86.70%,99%,56.38%,49.10%,49.54%,0.00%
EU,28,24,0%,83.30%,2823,2.96,1.8,62%,4.9,17.8,89.30%,91.20%,83.30%,98%,64.91%,50.25%,51.06%,0.00%
EU,29,29,0%,75.90%,1750,1.62,1.3,59%,2.2,3.6,88.10%,93.60%,55.20%,91%,54.39%,49.78%,49.34%,0.00%
EU,30,26,0%,92.30%,2631,3.12,1.8,69%,3.1,27,92.90%,93.80%,88.50%,97%,57.57%,49.93%,49.96%,0.00%
EU,31,31,0%,90.30%,2126,2.16,1.2,61%,3.4,13.4,85.20%,91.20%,83.90%,98%,52.31%,50.24%,49.30%,0.00%
EU,32,44,1%,77.30%,1848,2.91,0.7,77%,3.4,14.2,85.40%,91.70%,79.50%,96%,50.22%,50.67%,50.91%,0.00%
EU,33,74,1%,94.60%,1811,3.24,1.5,59%,4.1,48,86.80%,86.30%,93.20%,99%,56.08%,49.98%,49.17%,0.00%
EU,34,158,2%,77.80%,1290,1.66,0.9,53%,2.4,4.4,78.40%,90.70%,62.70%,93%,49.45%,49.80%,50.05%,0.00%
EU,35,21,0%,61.90%,1796,1.19,1.4,86%,1.5,2.5,77.00%,86.60%,52.40%,82%,48.99%,50.98%,50.38%,0.00%
EU,36,120,2%,55.80%,1730,1.1,1.6,68%,1.3,2.2,85.30%,85.90%,49.20%,83%,60.61%,50.43%,49.95%,0.10%
EU,37,25,0%,88.00%,5110,3.6,1.5,96%,3.7,45,94.90%,91.70%,92.00%,100%,60.44%,50.29%,51.16%,0.00%
EU,38,350,5%,62.00%,1159,1.09,1.3,63%,1.2,2.3,83.10%,89.70%,52.30%,84%,52.65%,50.37%,50.42%,0.00%
EU,39,25,0%,84.00%,4965,2.72,1.5,84%,3.6,13.6,89.40%,91.30%,80.00%,97%,54.95%,49.64%,50.59%,0.00%
EU,40,22,0%,90.90%,4394,3.09,2.3,64%,4.2,34,92.60%,90.30%,90.90%,98%,52.49%,50.46%,50.63%,0.00%
EU,41,57,1%,63.20%,3078,1.63,2.3,96%,2,3.3,85.40%,86.30%,50.90%,85%,60.62%,51.59%,52.10%,0.00%
EU,42,22,0%,68.20%,2270,0.95,1.3,91%,1.6,1.9,85.20%,88.90%,50.00%,85%,59.46%,50.97%,50.61%,0.00%
EU,43,45,1%,64.40%,1482,0.93,1.6,62%,1.2,1.8,83.00%,91.60%,48.90%,79%,50.40%,51.15%,50.79%,0.00%
EU,44,56,1%,96.40%,1927,2.79,1.6,77%,5.4,31.2,85.60%,90.20%,91.10%,98%,54.95%,49.96%,49.62%,0.00%
EU,45,28,0%,96.40%,4659,3.5,1.4,64%,3.8,49,89.00%,91.70%,92.90%,100%,54.81%,49.56%,49.85%,0.00%
EU,46,134,2%,70.90%,1291,1.99,1,49%,3.3,5.6,82.90%,91.80%,64.20%,94%,55.71%,51.75%,51.64%,0.00%
EU,47,51,1%,72.50%,1119,1.43,0.9,78%,1.9,3.8,89.20%,89.20%,62.70%,89%,52.58%,52.04%,52.06%,0.00%
EU,48,45,1%,86.70%,2756,2.71,2.2,64%,4.1,12.2,90.10%,91.50%,77.80%,97%,63.68%,49.88%,49.92%,0.00%
EU,49,35,1%,97.10%,5932,3.57,1.1,94%,5.7,41.7,88.10%,96.30%,91.40%,99%,70.46%,49.51%,50.42%,0.00%
EU,50,186,3%,60.80%,1169,1.02,1.2,49%,1.2,2.1,80.20%,89.20%,52.20%,84%,56.65%,50.14%,50.07%,0.00%
EU,51,25,0%,92.00%,2194,4.68,2.3,60%,4.9,117,86.20%,92.00%,96.00%,100%,70.74%,52.26%,51.76%,0.00%
EU,52,93,1%,62.40%,1444,1.1,1.1,54%,1.7,2.9,88.00%,92.30%,62.40%,85%,72.96%,49.89%,50.29%,0.00%
EU,53,25,0%,80.00%,2374,2.8,1.5,68%,3.5,11.7,86.80%,90.50%,76.00%,95%,60.96%,49.42%,48.68%,0.00%
EU,54,30,0%,53.30%,2384,1.27,1.7,73%,1.6,2.5,85.00%,86.50%,50.00%,81%,54.58%,49.33%,50.27%,0.00%
EU,55,29,0%,79.30%,2219,1.93,1.6,69%,2.1,5.1,88.30%,86.10%,62.10%,89%,47.58%,50.43%,49.39%,0.00%
EU,56,73,1%,69.90%,2036,2.33,0.9,64%,3.2,8.5,90.80%,94.00%,72.60%,95%,52.47%,49.24%,49.05%,0.10%
EU,57,26,0%,96.20%,949,3.08,2,50%,3.2,26.7,83.20%,87.10%,88.50%,97%,46.64%,49.42%,48.36%,0.00%
EU,58,20,0%,65.00%,344,0.45,0.9,45%,0.7,1.3,75.50%,73.80%,65.00%,83%,45.36%,49.30%,49.03%,0.00%
EU,59,149,2%,34.90%,1105,0.8,1.1,60%,0.9,1.1,82.80%,85.80%,28.90%,78%,45.21%,50.08%,51.28%,0.00%
EU,60,22,0%,63.60%,1108,0.91,1,91%,1.3,1.4,78.70%,85.00%,36.40%,81%,54.54%,49.66%,49.03%,0.00%
EU,61,36,1%,94.40%,2794,3.81,2.5,83%,6.2,45.7,85.30%,92.10%,91.70%,100%,63.28%,50.37%,50.28%,0.00%
EU,62,32,0%,31.20%,1786,1.19,0.9,75%,1.8,2,90.60%,91.90%,40.60%,88%,61.60%,49.13%,50.35%,0.00%
EU,63,21,0%,85.70%,2476,3.33,2,76%,4.8,35,91.50%,95.70%,90.50%,99%,53.93%,50.29%,49.74%,0.00%
NA,64,23,0%,91.30%,2371,3.57,0.9,70%,4.8,20.5,86.10%,92.50%,82.60%,99%,58.19%,49.00%,50.44%,0.30%
NA,65,25,0%,96.00%,4281,2.56,1.8,72%,4.1,64,90.20%,91.40%,96.00%,100%,62.10%,51.41%,50.28%,0.00%
NA,66,238,3%,76.10%,2183,1.56,1.5,50%,2.8,5.7,79.70%,89.90%,72.70%,92%,68.48%,50.75%,50.57%,0.00%
NA,67,56,1%,73.20%,2022,1.88,1.3,68%,2.5,6.6,85.20%,90.40%,71.40%,93%,55.31%,49.88%,49.73%,0.10%
NA,68,25,0%,92.00%,6141,3.36,1.2,100%,3.5,28,92.20%,93.80%,88.00%,99%,62.64%,49.81%,50.96%,0.00%
NA,69,44,1%,77.30%,4178,1.93,1.5,77%,3,12.1,92.10%,91.60%,84.10%,98%,53.67%,50.20%,50.23%,0.00%
NA,70,26,0%,96.20%,3412,3.46,1.8,69%,3.6,90,92.20%,93.90%,96.20%,100%,65.85%,48.95%,49.25%,0.00%
NA,71,58,1%,77.60%,1642,1.93,0.9,60%,2.2,5.6,86.00%,94.60%,65.50%,87%,46.03%,49.73%,50.08%,0.00%
NA,72,197,3%,78.20%,2416,2.37,1.2,64%,3.3,10.8,86.30%,92.80%,78.20%,97%,56.68%,49.22%,49.50%,0.00%
NA,73,23,0%,60.90%,3932,1.91,2,87%,3,4.9,89.50%,90.70%,60.90%,89%,60.65%,48.75%,50.51%,0.00%
NA,74,42,1%,78.60%,1431,2.45,0.7,36%,2.2,6.9,84.50%,89.30%,64.30%,90%,50.81%,49.26%,49.33%,0.00%
NA,75,21,0%,81.00%,3748,3.29,1.3,57%,4,17.2,91.90%,92.50%,81.00%,100%,61.77%,48.23%,48.98%,0.00%
NA,76,34,0%,88.20%,2707,2.59,1.4,68%,3,44,84.50%,90.50%,94.10%,96%,55.79%,50.34%,49.42%,0.00%
NA,77,115,2%,74.80%,2171,2.19,1.4,74%,2.9,8.4,89.00%,91.40%,73.90%,95%,59.53%,49.65%,49.88%,0.00%
NA,78,23,0%,65.20%,1958,1.96,0.5,61%,2.3,5.6,89.80%,93.30%,65.20%,92%,62.10%,50.31%,49.85%,0.00%
NA,79,218,3%,74.30%,1860,2.16,1.5,65%,2.6,7.2,85.90%,91.60%,70.20%,95%,53.76%,50.11%,49.84%,0.00%
NA,80,35,1%,57.10%,3142,1.71,1.9,80%,2.3,3.2,90.00%,93.10%,45.70%,86%,56.23%,50.16%,51.49%,0.00%
NA,81,32,0%,90.60%,3407,2.62,1.2,62%,3.6,16.8,85.80%,91.90%,84.40%,97%,54.91%,49.20%,49.43%,0.00%
NA,82,20,0%,90.00%,4472,3.4,2.2,75%,4.1,34,86.20%,83.10%,90.00%,100%,50.16%,50.67%,50.02%,0.00%
NA,83,51,1%,72.50%,1023,2.08,1.1,76%,2.2,5.6,88.30%,93.20%,62.70%,91%,73.85%,56.05%,50.69%,23.20%
NA,84,47,1%,80.90%,3820,2.45,1.4,85%,3.7,12.8,93.20%,94.90%,80.90%,98%,61.01%,50.73%,50.39%,0.00%
NA,85,71,1%,91.50%,3159,2.73,0.9,65%,3.9,27.7,89.40%,92.40%,90.10%,99%,55.39%,49.64%,50.01%,0.00%
NA,86,28,0%,85.70%,4249,2.46,1.3,79%,3.1,23,91.90%,93.70%,89.30%,95%,61.07%,50.13%,50.15%,0.00%
NA,87,24,0%,75.00%,3048,2.17,1.9,75%,2.7,10.4,85.40%,90.00%,79.20%,98%,55.74%,49.79%,50.05%,0.00%
NA,88,34,0%,67.60%,3317,2.21,2.1,65%,3.6,6.8,90.50%,91.30%,67.60%,96%,61.83%,49.97%,49.88%,0.00%
NA,89,23,0%,30.40%,1399,0.52,1.3,91%,0.9,0.8,87.30%,85.40%,30.40%,71%,49.58%,50.38%,51.69%,0.00%
NA,90,20,0%,75.00%,1305,0.6,1.4,60%,1.1,1.7,88.10%,80.10%,65.00%,91%,48.23%,49.76%,49.40%,0.00%
NA,91,24,0%,79.20%,2554,2.96,1.2,50%,5.6,17.8,93.30%,95.50%,83.30%,98%,58.79%,50.82%,51.10%,0.00%
NA,92,48,1%,56.20%,1707,0.69,0.7,92%,0.8,1.4,81.30%,86.80%,52.10%,87%,55.85%,53.43%,53.97%,0.00%
NA,93,130,2%,62.30%,1912,1.31,1.3,70%,1.3,2.9,89.00%,91.70%,55.40%,86%,59.63%,49.95%,50.11%,0.00%
NA,94,35,1%,77.10%,3875,2.74,1.8,57%,3.6,12,89.60%,94.40%,77.10%,95%,59.73%,49.60%,50.04%,0.00%
NA,95,23,0%,73.90%,2688,3.17,1,74%,3.4,14.6,92.50%,93.20%,78.30%,96%,51.21%,49.86%,50.33%,0.00%
NA,96,26,0%,61.50%,1796,1.19,1.2,31%,1.6,2.8,75.60%,84.20%,57.70%,91%,54.00%,50.02%,50.03%,0.00%
NA,97,21,0%,90.50%,1869,2.52,2.3,76%,3.2,17.7,85.40%,89.60%,85.70%,96%,56.43%,49.38%,49.01%,0.00%
NA,98,101,1%,71.30%,1499,2,0.7,58%,2.7,5.3,83.30%,91.50%,62.40%,93%,52.60%,49.80%,49.63%,0.10%
NA,99,20,0%,60.00%,1368,1,0.9,45%,1.4,2.9,83.50%,87.90%,65.00%,84%,54.73%,50.49%,50.26%,0.00%
NA,100,24,0%,79.20%,1998,2.54,1.6,75%,3.4,20.3,85.30%,83.70%,87.50%,98%,53.43%,50.95%,50.42%,0.30%
NA,101,26,0%,42.30%,1170,0.77,1.7,73%,1.3,1.2,75.50%,86.50%,34.60%,81%,46.59%,49.31%,50.13%,0.00%
NA,102,26,0%,53.80%,1013,0.85,0.8,62%,1.1,1.2,74.20%,82.40%,26.90%,83%,52.75%,49.08%,49.42%,0.00%
NA,103,23,0%,91.30%,3980,3,1.4,83%,3.1,34.5,86.00%,90.80%,91.30%,97%,63.72%,49.86%,49.82%,0.00%
NA,104,57,1%,71.90%,1694,1.49,0.6,74%,2.8,4.7,82.80%,86.80%,68.40%,92%,46.26%,49.48%,48.84%,0.00%
ASIA,105,330,5%,82.40%,2195,2.01,1.7,63%,2.7,7.5,89.80%,92.70%,73.00%,94%,57.98%,49.95%,49.71%,0.00%
ASIA,106,132,2%,77.30%,1268,1.31,0.8,58%,2.2,3.5,82.20%,92.40%,62.10%,85%,62.78%,49.79%,50.26%,0.00%
ASIA,107,21,0%,90.50%,3749,3.67,1.8,81%,4.1,38.5,90.70%,93.70%,90.50%,97%,53.77%,49.37%,50.06%,0.00%
ASIA,108,35,1%,85.70%,4501,2.6,1.6,74%,4,15.2,89.10%,91.20%,82.90%,99%,54.47%,49.39%,49.24%,0.00%
ASIA,109,67,1%,73.10%,1278,1.7,1.5,54%,2.8,5.7,83.80%,88.00%,70.10%,93%,55.23%,51.01%,50.11%,0.10%
ASIA,110,70,1%,91.40%,1525,1.54,1.1,54%,3.5,54,78.50%,86.10%,97.10%,99%,49.45%,49.53%,48.75%,0.00%
ASIA,111,49,1%,67.30%,2050,1.96,0.7,73%,2.7,5.3,85.70%,91.40%,63.30%,93%,52.58%,49.79%,49.79%,0.00%
1 TOTAL Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
2 Total 6942 100% 71.80% 2058 1.86 1.4 64% 2.3 5.4 86.10% 90.80% 65.30% 90% 57.08% 50.15% 50.12% 0.20%
3
4 Result Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
5 Loss 1959 28% 0.00% 1715 1.12 1.3 61% 1.3 1.3 84.70% 88.60% 13.40% 78% 56.47% 49.56% 50.92% 0.10%
6 Win 4983 72% 100.00% 2193 2.16 1.4 65% 3 15.1 86.50% 91.40% 85.70% 95% 57.32% 50.39% 49.80% 0.20%
7
8 Battle Type Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
9 Encounter 4652 67% 73.00% 1969 1.98 1.4 67% 2.5 6 85.70% 90.70% 66.80% 91% 57.43% 50.41% 50.33% 0.30%
10 Supremacy 2290 33% 69.30% 2238 1.63 1.2 60% 2 4.3 87.10% 91.20% 62.20% 89% 56.37% 49.63% 49.69% 0.00%
11
12 Tier Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
13 Bottom tier 2480 36% 69.50% 1750 1.53 1.2 0% 2.2 3.9 85.40% 89.20% 60.70% 88% 56.91% 50.13% 49.99% 0.10%
14 Top tier 4462 64% 73.10% 2229 2.05 1.5 100% 2.4 6.4 86.50% 91.60% 67.90% 91% 57.18% 50.16% 50.19% 0.20%
15
16 Tank Tier Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
17 1 89 1% 80.90% 678 1.89 1.9 40% 3 7.6 86.20% 91.80% 75.30% 95% 55.40% 48.80% 48.40% 0.00%
18 2 180 3% 77.80% 970 2.64 1.6 73% 3.3 9.1 82.90% 90.60% 71.10% 93% 56.04% 49.36% 49.46% 0.90%
19 3 540 8% 75.70% 1099 2.15 1.4 36% 3.1 7 83.60% 90.00% 69.10% 93% 57.55% 51.15% 50.16% 1.90%
20 4 628 9% 75.20% 1256 2.21 1.3 73% 3.1 7.4 85.00% 91.60% 70.20% 94% 55.72% 51.76% 51.65% 0.00%
21 5 626 9% 80.20% 1503 2.29 1.3 71% 3.2 8.3 86.90% 89.50% 72.20% 93% 55.69% 50.38% 49.95% 0.00%
22 6 1064 15% 74.20% 1801 1.97 1.4 62% 2.4 5.8 86.70% 92.20% 65.90% 90% 56.82% 49.24% 49.31% 0.00%
23 7 1141 16% 71.80% 2143 1.69 1.3 50% 2.5 4.9 85.70% 90.10% 65.80% 90% 58.48% 49.62% 49.60% 0.00%
24 8 1222 18% 68.20% 2371 1.59 1.4 67% 2.1 4.2 87.40% 90.90% 61.80% 89% 56.84% 49.80% 49.99% 0.00%
25 9 598 9% 64.70% 2806 1.61 1.2 49% 2.1 4 89.10% 91.90% 59.50% 87% 56.58% 50.13% 50.32% 0.00%
26 10 854 12% 65.60% 3270 1.62 1.5 100% 2 4 88.30% 90.20% 59.60% 88% 58.37% 50.83% 51.16% 0.00%
27
28 Tank Class Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
29 Light Tank 1337 19% 74.40% 1589 1.88 1.9 59% 2.3 5.9 83.70% 89.20% 68.40% 90% 57.15% 50.20% 49.90% 0.70%
30 Medium Tank 1957 28% 73.10% 2181 1.99 1.7 67% 2.4 5.9 88.20% 91.40% 66.40% 90% 57.23% 50.26% 50.12% 0.10%
31 Heavy Tank 2032 29% 70.00% 2180 1.75 1.2 70% 1.9 5 87.20% 90.70% 65.20% 91% 56.72% 50.16% 50.23% 0.00%
32 Tank Destroyer 1616 23% 70.30% 2144 1.84 0.7 59% 3 4.8 85.10% 92.60% 61.50% 91% 57.31% 49.98% 50.16% 0.00%
33
34 Player WR Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
35 35 - 45% 80 1% 43.80% 1255 0.93 1 55% 1.1 1.5 84.00% 87.10% 37.50% 82% 44.52% 49.84% 51.14% 0.00%
36 45 - 50% 584 8% 69.20% 1397 1.46 1.1 62% 1.8 3.8 81.20% 87.40% 61.30% 89% 47.86% 49.84% 49.86% 0.00%
37 50 - 55% 1970 28% 69.00% 1861 1.73 1.3 63% 2.1 4.3 85.40% 90.20% 60.20% 88% 53.06% 50.10% 49.99% 0.00%
38 55 - 65% 3677 53% 73.50% 2249 2.01 1.4 66% 2.5 6.3 87.50% 91.50% 68.10% 92% 58.78% 50.13% 50.14% 0.00%
39 65 - % 631 9% 76.40% 2274 1.95 1.4 61% 2.8 7 84.60% 91.40% 72.10% 91% 69.92% 50.79% 50.51% 1.90%
40
41 Player Hit Rate Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
42 0 - 25% 32 0% 43.80% 1 0 1.6 47% 0 0 0.00% inf% 25.00% 57% 54.55% 50.15% 51.14% 0.00%
43 25 - 50% 47 1% 44.70% 693 0.34 1.3 51% 0.6 0.5 38.70% 90.50% 36.20% 77% 55.05% 50.14% 51.15% 0.00%
44 50 - 60% 172 2% 56.40% 876 0.6 1.2 58% 0.8 1.1 54.70% 87.80% 44.80% 81% 56.38% 50.61% 50.48% 0.00%
45 60 - 70% 461 7% 58.80% 1254 1.08 1.2 61% 1.4 2.4 65.40% 87.70% 54.20% 87% 56.29% 50.18% 50.50% 0.00%
46 70 - 80% 941 14% 70.50% 1691 1.59 1.3 63% 2 4.6 75.50% 89.10% 65.70% 91% 56.92% 50.36% 50.24% 0.00%
47 80 - 90% 2091 30% 74.00% 2071 1.98 1.4 66% 2.5 6.3 85.00% 90.60% 68.50% 93% 57.00% 50.10% 50.08% 0.10%
48 90 - 95% 1258 18% 81.00% 2561 2.52 1.5 66% 3.3 11 92.30% 92.00% 77.10% 96% 57.73% 50.08% 49.85% 0.30%
49 95 - % 1940 28% 69.60% 2259 1.82 1.4 64% 2.2 4.5 99.00% 91.70% 59.80% 86% 57.17% 50.12% 50.11% 0.40%
50
51 Player Pen Rate Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
52 0 - 25% 49 1% 38.80% 6 0 1.5 39% 0 0 45.80% 10.50% 22.40% 56% 55.11% 49.96% 50.47% 0.00%
53 25 - 50% 43 1% 30.20% 447 0.19 1.7 44% 0.3 0.2 82.30% 38.40% 20.90% 66% 55.41% 50.75% 51.06% 0.00%
54 50 - 60% 110 2% 41.80% 642 0.27 1.5 60% 0.5 0.4 77.50% 53.10% 32.70% 70% 54.44% 50.46% 50.61% 0.00%
55 60 - 70% 210 3% 52.40% 1085 0.63 1.3 56% 0.9 1.1 81.00% 65.10% 40.00% 79% 55.71% 50.58% 50.39% 0.00%
56 70 - 80% 469 7% 65.00% 1669 1.33 1.4 61% 1.6 3.1 83.50% 75.40% 57.60% 89% 56.39% 50.24% 50.30% 0.00%
57 80 - 90% 1544 22% 71.60% 2076 1.86 1.4 61% 2.3 5.5 86.00% 85.30% 66.30% 92% 57.35% 50.17% 50.03% 0.20%
58 90 - 95% 1210 17% 79.30% 2509 2.53 1.5 66% 3.3 11 87.80% 92.40% 77.00% 96% 57.57% 50.00% 50.09% 0.20%
59 95 - % 3307 48% 73.30% 2100 1.88 1.3 67% 2.4 5.5 86.30% 99.30% 65.60% 90% 57.11% 50.14% 50.10% 0.20%
60
61 Server account_id_anon Battles % Battles WR DPB KPB Spot Top tier DR KDR Hit rate Pen rate Surv% Share live Player WR Allies WR Enemies WR No stats
62 RU 1 33 0% 78.80% 3112 1.91 1.6 67% 2.5 7.9 89.60% 90.20% 75.80% 87% 71.43% 50.74% 51.07% 0.00%
63 RU 2 23 0% 87.00% 3525 2.78 1.7 74% 4.3 32 90.40% 94.40% 91.30% 100% 59.39% 48.07% 48.75% 0.00%
64 RU 3 81 1% 66.70% 1927 1.47 1 75% 1.9 3.1 82.30% 89.60% 53.10% 86% 69.59% 50.23% 50.85% 0.00%
65 EU 4 26 0% 80.80% 4082 2.62 1.2 62% 4.1 17 91.10% 93.80% 84.60% 98% 53.92% 48.75% 49.31% 0.00%
66 EU 5 79 1% 59.50% 1920 0.97 1.4 75% 1.4 2 80.20% 87.10% 50.60% 84% 59.06% 50.12% 51.22% 0.00%
67 EU 6 92 1% 60.90% 1685 0.99 1.5 65% 1.3 1.8 87.80% 88.50% 45.70% 83% 57.79% 50.30% 50.77% 0.00%
68 EU 7 50 1% 78.00% 2787 2.92 1.9 52% 4 16.2 90.60% 92.70% 82.00% 99% 64.87% 50.49% 50.50% 0.00%
69 EU 8 69 1% 60.90% 1695 1.48 1.9 55% 1.5 3 87.80% 92.10% 50.70% 77% 54.73% 50.06% 49.81% 0.10%
70 EU 9 33 0% 63.60% 1529 1.55 1.9 64% 2 3.6 82.10% 91.30% 57.60% 85% 52.48% 49.85% 50.92% 0.00%
71 EU 10 22 0% 90.90% 2990 3.82 1 59% 3.6 42 85.60% 93.00% 90.90% 100% 57.27% 48.97% 49.67% 0.00%
72 EU 11 35 1% 62.90% 1197 0.97 1.1 66% 1.3 2 85.20% 88.10% 51.40% 81% 55.89% 50.71% 49.97% 0.00%
73 EU 12 20 0% 95.00% 4854 3.95 1.2 25% 4.9 79 94.40% 95.60% 95.00% 99% 56.71% 49.15% 49.81% 0.00%
74 EU 13 80 1% 73.80% 2228 2.65 1.4 69% 3.3 8.5 92.10% 92.70% 68.80% 95% 58.83% 49.43% 49.21% 0.00%
75 EU 14 30 0% 83.30% 2167 3.93 2 63% 4.2 19.7 87.90% 92.00% 80.00% 98% 62.43% 50.39% 49.69% 0.00%
76 EU 15 305 4% 55.40% 2126 1.21 1.3 78% 1.6 2.4 85.80% 90.90% 49.50% 87% 58.91% 50.46% 50.47% 0.00%
77 EU 16 49 1% 69.40% 2362 2.47 1.5 43% 4 7.1 90.20% 93.30% 65.30% 94% 62.94% 49.43% 49.50% 0.00%
78 EU 17 22 0% 86.40% 1898 4.41 1.4 95% 4.8 48.5 90.60% 94.80% 90.90% 100% 57.61% 48.11% 49.25% 0.00%
79 EU 18 96 1% 76.00% 1764 2.19 0.9 67% 3.2 7.2 89.40% 95.00% 69.80% 94% 56.39% 50.00% 49.58% 0.00%
80 EU 19 23 0% 95.70% 1997 2.09 1.3 65% 3.8 16 90.70% 94.20% 87.00% 98% 70.96% 48.51% 49.66% 0.00%
81 EU 20 256 4% 54.30% 1081 0.58 1.5 55% 0.9 0.8 81.10% 83.80% 28.10% 68% 52.29% 50.31% 49.81% 0.00%
82 EU 21 73 1% 82.20% 1025 1.9 1.5 55% 2.7 6.3 84.20% 92.30% 69.90% 94% 58.95% 51.61% 50.45% 0.00%
83 EU 22 53 1% 79.20% 1415 1.98 0.9 47% 3.2 7 87.40% 90.40% 71.70% 95% 57.15% 50.10% 49.76% 0.00%
84 EU 23 70 1% 81.40% 2224 2.5 1.8 47% 4 9.7 89.20% 90.20% 74.30% 96% 61.99% 50.85% 50.17% 0.00%
85 EU 24 83 1% 73.50% 3049 2.1 2 73% 3.2 7.2 89.60% 91.70% 71.10% 96% 60.48% 49.78% 49.51% 0.00%
86 EU 25 127 2% 68.50% 1609 1.86 1.3 52% 2.4 4.5 83.40% 89.50% 59.10% 89% 54.64% 49.76% 49.35% 0.00%
87 EU 26 52 1% 80.80% 2669 2.62 2.2 50% 3 11.3 87.80% 91.00% 76.90% 95% 62.66% 49.60% 49.65% 0.20%
88 EU 27 30 0% 86.70% 4246 3.17 1.4 57% 3.6 23.8 88.10% 95.30% 86.70% 99% 56.38% 49.10% 49.54% 0.00%
89 EU 28 24 0% 83.30% 2823 2.96 1.8 62% 4.9 17.8 89.30% 91.20% 83.30% 98% 64.91% 50.25% 51.06% 0.00%
90 EU 29 29 0% 75.90% 1750 1.62 1.3 59% 2.2 3.6 88.10% 93.60% 55.20% 91% 54.39% 49.78% 49.34% 0.00%
91 EU 30 26 0% 92.30% 2631 3.12 1.8 69% 3.1 27 92.90% 93.80% 88.50% 97% 57.57% 49.93% 49.96% 0.00%
92 EU 31 31 0% 90.30% 2126 2.16 1.2 61% 3.4 13.4 85.20% 91.20% 83.90% 98% 52.31% 50.24% 49.30% 0.00%
93 EU 32 44 1% 77.30% 1848 2.91 0.7 77% 3.4 14.2 85.40% 91.70% 79.50% 96% 50.22% 50.67% 50.91% 0.00%
94 EU 33 74 1% 94.60% 1811 3.24 1.5 59% 4.1 48 86.80% 86.30% 93.20% 99% 56.08% 49.98% 49.17% 0.00%
95 EU 34 158 2% 77.80% 1290 1.66 0.9 53% 2.4 4.4 78.40% 90.70% 62.70% 93% 49.45% 49.80% 50.05% 0.00%
96 EU 35 21 0% 61.90% 1796 1.19 1.4 86% 1.5 2.5 77.00% 86.60% 52.40% 82% 48.99% 50.98% 50.38% 0.00%
97 EU 36 120 2% 55.80% 1730 1.1 1.6 68% 1.3 2.2 85.30% 85.90% 49.20% 83% 60.61% 50.43% 49.95% 0.10%
98 EU 37 25 0% 88.00% 5110 3.6 1.5 96% 3.7 45 94.90% 91.70% 92.00% 100% 60.44% 50.29% 51.16% 0.00%
99 EU 38 350 5% 62.00% 1159 1.09 1.3 63% 1.2 2.3 83.10% 89.70% 52.30% 84% 52.65% 50.37% 50.42% 0.00%
100 EU 39 25 0% 84.00% 4965 2.72 1.5 84% 3.6 13.6 89.40% 91.30% 80.00% 97% 54.95% 49.64% 50.59% 0.00%
101 EU 40 22 0% 90.90% 4394 3.09 2.3 64% 4.2 34 92.60% 90.30% 90.90% 98% 52.49% 50.46% 50.63% 0.00%
102 EU 41 57 1% 63.20% 3078 1.63 2.3 96% 2 3.3 85.40% 86.30% 50.90% 85% 60.62% 51.59% 52.10% 0.00%
103 EU 42 22 0% 68.20% 2270 0.95 1.3 91% 1.6 1.9 85.20% 88.90% 50.00% 85% 59.46% 50.97% 50.61% 0.00%
104 EU 43 45 1% 64.40% 1482 0.93 1.6 62% 1.2 1.8 83.00% 91.60% 48.90% 79% 50.40% 51.15% 50.79% 0.00%
105 EU 44 56 1% 96.40% 1927 2.79 1.6 77% 5.4 31.2 85.60% 90.20% 91.10% 98% 54.95% 49.96% 49.62% 0.00%
106 EU 45 28 0% 96.40% 4659 3.5 1.4 64% 3.8 49 89.00% 91.70% 92.90% 100% 54.81% 49.56% 49.85% 0.00%
107 EU 46 134 2% 70.90% 1291 1.99 1 49% 3.3 5.6 82.90% 91.80% 64.20% 94% 55.71% 51.75% 51.64% 0.00%
108 EU 47 51 1% 72.50% 1119 1.43 0.9 78% 1.9 3.8 89.20% 89.20% 62.70% 89% 52.58% 52.04% 52.06% 0.00%
109 EU 48 45 1% 86.70% 2756 2.71 2.2 64% 4.1 12.2 90.10% 91.50% 77.80% 97% 63.68% 49.88% 49.92% 0.00%
110 EU 49 35 1% 97.10% 5932 3.57 1.1 94% 5.7 41.7 88.10% 96.30% 91.40% 99% 70.46% 49.51% 50.42% 0.00%
111 EU 50 186 3% 60.80% 1169 1.02 1.2 49% 1.2 2.1 80.20% 89.20% 52.20% 84% 56.65% 50.14% 50.07% 0.00%
112 EU 51 25 0% 92.00% 2194 4.68 2.3 60% 4.9 117 86.20% 92.00% 96.00% 100% 70.74% 52.26% 51.76% 0.00%
113 EU 52 93 1% 62.40% 1444 1.1 1.1 54% 1.7 2.9 88.00% 92.30% 62.40% 85% 72.96% 49.89% 50.29% 0.00%
114 EU 53 25 0% 80.00% 2374 2.8 1.5 68% 3.5 11.7 86.80% 90.50% 76.00% 95% 60.96% 49.42% 48.68% 0.00%
115 EU 54 30 0% 53.30% 2384 1.27 1.7 73% 1.6 2.5 85.00% 86.50% 50.00% 81% 54.58% 49.33% 50.27% 0.00%
116 EU 55 29 0% 79.30% 2219 1.93 1.6 69% 2.1 5.1 88.30% 86.10% 62.10% 89% 47.58% 50.43% 49.39% 0.00%
117 EU 56 73 1% 69.90% 2036 2.33 0.9 64% 3.2 8.5 90.80% 94.00% 72.60% 95% 52.47% 49.24% 49.05% 0.10%
118 EU 57 26 0% 96.20% 949 3.08 2 50% 3.2 26.7 83.20% 87.10% 88.50% 97% 46.64% 49.42% 48.36% 0.00%
119 EU 58 20 0% 65.00% 344 0.45 0.9 45% 0.7 1.3 75.50% 73.80% 65.00% 83% 45.36% 49.30% 49.03% 0.00%
120 EU 59 149 2% 34.90% 1105 0.8 1.1 60% 0.9 1.1 82.80% 85.80% 28.90% 78% 45.21% 50.08% 51.28% 0.00%
121 EU 60 22 0% 63.60% 1108 0.91 1 91% 1.3 1.4 78.70% 85.00% 36.40% 81% 54.54% 49.66% 49.03% 0.00%
122 EU 61 36 1% 94.40% 2794 3.81 2.5 83% 6.2 45.7 85.30% 92.10% 91.70% 100% 63.28% 50.37% 50.28% 0.00%
123 EU 62 32 0% 31.20% 1786 1.19 0.9 75% 1.8 2 90.60% 91.90% 40.60% 88% 61.60% 49.13% 50.35% 0.00%
124 EU 63 21 0% 85.70% 2476 3.33 2 76% 4.8 35 91.50% 95.70% 90.50% 99% 53.93% 50.29% 49.74% 0.00%
125 NA 64 23 0% 91.30% 2371 3.57 0.9 70% 4.8 20.5 86.10% 92.50% 82.60% 99% 58.19% 49.00% 50.44% 0.30%
126 NA 65 25 0% 96.00% 4281 2.56 1.8 72% 4.1 64 90.20% 91.40% 96.00% 100% 62.10% 51.41% 50.28% 0.00%
127 NA 66 238 3% 76.10% 2183 1.56 1.5 50% 2.8 5.7 79.70% 89.90% 72.70% 92% 68.48% 50.75% 50.57% 0.00%
128 NA 67 56 1% 73.20% 2022 1.88 1.3 68% 2.5 6.6 85.20% 90.40% 71.40% 93% 55.31% 49.88% 49.73% 0.10%
129 NA 68 25 0% 92.00% 6141 3.36 1.2 100% 3.5 28 92.20% 93.80% 88.00% 99% 62.64% 49.81% 50.96% 0.00%
130 NA 69 44 1% 77.30% 4178 1.93 1.5 77% 3 12.1 92.10% 91.60% 84.10% 98% 53.67% 50.20% 50.23% 0.00%
131 NA 70 26 0% 96.20% 3412 3.46 1.8 69% 3.6 90 92.20% 93.90% 96.20% 100% 65.85% 48.95% 49.25% 0.00%
132 NA 71 58 1% 77.60% 1642 1.93 0.9 60% 2.2 5.6 86.00% 94.60% 65.50% 87% 46.03% 49.73% 50.08% 0.00%
133 NA 72 197 3% 78.20% 2416 2.37 1.2 64% 3.3 10.8 86.30% 92.80% 78.20% 97% 56.68% 49.22% 49.50% 0.00%
134 NA 73 23 0% 60.90% 3932 1.91 2 87% 3 4.9 89.50% 90.70% 60.90% 89% 60.65% 48.75% 50.51% 0.00%
135 NA 74 42 1% 78.60% 1431 2.45 0.7 36% 2.2 6.9 84.50% 89.30% 64.30% 90% 50.81% 49.26% 49.33% 0.00%
136 NA 75 21 0% 81.00% 3748 3.29 1.3 57% 4 17.2 91.90% 92.50% 81.00% 100% 61.77% 48.23% 48.98% 0.00%
137 NA 76 34 0% 88.20% 2707 2.59 1.4 68% 3 44 84.50% 90.50% 94.10% 96% 55.79% 50.34% 49.42% 0.00%
138 NA 77 115 2% 74.80% 2171 2.19 1.4 74% 2.9 8.4 89.00% 91.40% 73.90% 95% 59.53% 49.65% 49.88% 0.00%
139 NA 78 23 0% 65.20% 1958 1.96 0.5 61% 2.3 5.6 89.80% 93.30% 65.20% 92% 62.10% 50.31% 49.85% 0.00%
140 NA 79 218 3% 74.30% 1860 2.16 1.5 65% 2.6 7.2 85.90% 91.60% 70.20% 95% 53.76% 50.11% 49.84% 0.00%
141 NA 80 35 1% 57.10% 3142 1.71 1.9 80% 2.3 3.2 90.00% 93.10% 45.70% 86% 56.23% 50.16% 51.49% 0.00%
142 NA 81 32 0% 90.60% 3407 2.62 1.2 62% 3.6 16.8 85.80% 91.90% 84.40% 97% 54.91% 49.20% 49.43% 0.00%
143 NA 82 20 0% 90.00% 4472 3.4 2.2 75% 4.1 34 86.20% 83.10% 90.00% 100% 50.16% 50.67% 50.02% 0.00%
144 NA 83 51 1% 72.50% 1023 2.08 1.1 76% 2.2 5.6 88.30% 93.20% 62.70% 91% 73.85% 56.05% 50.69% 23.20%
145 NA 84 47 1% 80.90% 3820 2.45 1.4 85% 3.7 12.8 93.20% 94.90% 80.90% 98% 61.01% 50.73% 50.39% 0.00%
146 NA 85 71 1% 91.50% 3159 2.73 0.9 65% 3.9 27.7 89.40% 92.40% 90.10% 99% 55.39% 49.64% 50.01% 0.00%
147 NA 86 28 0% 85.70% 4249 2.46 1.3 79% 3.1 23 91.90% 93.70% 89.30% 95% 61.07% 50.13% 50.15% 0.00%
148 NA 87 24 0% 75.00% 3048 2.17 1.9 75% 2.7 10.4 85.40% 90.00% 79.20% 98% 55.74% 49.79% 50.05% 0.00%
149 NA 88 34 0% 67.60% 3317 2.21 2.1 65% 3.6 6.8 90.50% 91.30% 67.60% 96% 61.83% 49.97% 49.88% 0.00%
150 NA 89 23 0% 30.40% 1399 0.52 1.3 91% 0.9 0.8 87.30% 85.40% 30.40% 71% 49.58% 50.38% 51.69% 0.00%
151 NA 90 20 0% 75.00% 1305 0.6 1.4 60% 1.1 1.7 88.10% 80.10% 65.00% 91% 48.23% 49.76% 49.40% 0.00%
152 NA 91 24 0% 79.20% 2554 2.96 1.2 50% 5.6 17.8 93.30% 95.50% 83.30% 98% 58.79% 50.82% 51.10% 0.00%
153 NA 92 48 1% 56.20% 1707 0.69 0.7 92% 0.8 1.4 81.30% 86.80% 52.10% 87% 55.85% 53.43% 53.97% 0.00%
154 NA 93 130 2% 62.30% 1912 1.31 1.3 70% 1.3 2.9 89.00% 91.70% 55.40% 86% 59.63% 49.95% 50.11% 0.00%
155 NA 94 35 1% 77.10% 3875 2.74 1.8 57% 3.6 12 89.60% 94.40% 77.10% 95% 59.73% 49.60% 50.04% 0.00%
156 NA 95 23 0% 73.90% 2688 3.17 1 74% 3.4 14.6 92.50% 93.20% 78.30% 96% 51.21% 49.86% 50.33% 0.00%
157 NA 96 26 0% 61.50% 1796 1.19 1.2 31% 1.6 2.8 75.60% 84.20% 57.70% 91% 54.00% 50.02% 50.03% 0.00%
158 NA 97 21 0% 90.50% 1869 2.52 2.3 76% 3.2 17.7 85.40% 89.60% 85.70% 96% 56.43% 49.38% 49.01% 0.00%
159 NA 98 101 1% 71.30% 1499 2 0.7 58% 2.7 5.3 83.30% 91.50% 62.40% 93% 52.60% 49.80% 49.63% 0.10%
160 NA 99 20 0% 60.00% 1368 1 0.9 45% 1.4 2.9 83.50% 87.90% 65.00% 84% 54.73% 50.49% 50.26% 0.00%
161 NA 100 24 0% 79.20% 1998 2.54 1.6 75% 3.4 20.3 85.30% 83.70% 87.50% 98% 53.43% 50.95% 50.42% 0.30%
162 NA 101 26 0% 42.30% 1170 0.77 1.7 73% 1.3 1.2 75.50% 86.50% 34.60% 81% 46.59% 49.31% 50.13% 0.00%
163 NA 102 26 0% 53.80% 1013 0.85 0.8 62% 1.1 1.2 74.20% 82.40% 26.90% 83% 52.75% 49.08% 49.42% 0.00%
164 NA 103 23 0% 91.30% 3980 3 1.4 83% 3.1 34.5 86.00% 90.80% 91.30% 97% 63.72% 49.86% 49.82% 0.00%
165 NA 104 57 1% 71.90% 1694 1.49 0.6 74% 2.8 4.7 82.80% 86.80% 68.40% 92% 46.26% 49.48% 48.84% 0.00%
166 ASIA 105 330 5% 82.40% 2195 2.01 1.7 63% 2.7 7.5 89.80% 92.70% 73.00% 94% 57.98% 49.95% 49.71% 0.00%
167 ASIA 106 132 2% 77.30% 1268 1.31 0.8 58% 2.2 3.5 82.20% 92.40% 62.10% 85% 62.78% 49.79% 50.26% 0.00%
168 ASIA 107 21 0% 90.50% 3749 3.67 1.8 81% 4.1 38.5 90.70% 93.70% 90.50% 97% 53.77% 49.37% 50.06% 0.00%
169 ASIA 108 35 1% 85.70% 4501 2.6 1.6 74% 4 15.2 89.10% 91.20% 82.90% 99% 54.47% 49.39% 49.24% 0.00%
170 ASIA 109 67 1% 73.10% 1278 1.7 1.5 54% 2.8 5.7 83.80% 88.00% 70.10% 93% 55.23% 51.01% 50.11% 0.10%
171 ASIA 110 70 1% 91.40% 1525 1.54 1.1 54% 3.5 54 78.50% 86.10% 97.10% 99% 49.45% 49.53% 48.75% 0.00%
172 ASIA 111 49 1% 67.30% 2050 1.96 0.7 73% 2.7 5.3 85.70% 91.40% 63.30% 93% 52.58% 49.79% 49.79% 0.00%
+1 -4127
View File
File diff suppressed because it is too large. Load diff
+415 -312
View File
@@ -1,342 +1,445 @@
#!/usr/bin/env python3.8
#!/usr/bin/env python3
## PYTHON VERSION MUST BE 3.7 OR HIGHER
import json, argparse, inspect, sys, os, io, base64, aiohttp, urllib, asyncio, aiofiles, aioconsole
import logging, re, concurrent.futures, configparser, motor.motor_asyncio, ssl, zipfile
import blitzutils as bu
from blitzutils import WG
from blitzutils import WoTinspector
import json, argparse, sys, os, io, asyncio, aiofiles, aioconsole
import logging, re, configparser, zipfile
import blitzutils1 as bu
from blitzutils1 import WG
from blitzutils1 import WoTinspector
logging.getLogger("asyncio").setLevel(logging.DEBUG)
FILE_CONFIG = 'blitzstats.ini'
FILE_CONFIG = "blitzstats.ini"
# DB_C_REPLAYS = 'Replays'
DEBUG = False
DEBUG = False
VERBOSE = False
SLEEP = 2
SLEEP = 2
MAX_RETRIES = 3
REPLAY_N = 0
SKIPPED_N = 0
ERROR_N = 0
WIurl='https://wotinspector.com/api/replay/upload?'
WG_appID = '81381d3f45fa4aa75b78a7198eb216ad'
wg = None
wi = None
async def main(argv):
global wg, wi
current_dir = os.getcwd()
# set the directory for the script
os.chdir(os.path.dirname(sys.argv[0]))
# options defaults
OPT_WORKERS_N = 5
WG_ID = None
WG_ACCOUNT = None # format: nick@server, where server is either 'eu', 'ru', 'na', 'asia' or 'china'.
# China is not supported since WG API stats are not available there
WG_RATE_LIMIT = 10
try:
## Read config
if os.path.isfile(FILE_CONFIG):
bu.debug('Reading config file: ' + FILE_CONFIG)
config = configparser.ConfigParser()
config.read(FILE_CONFIG)
try:
if 'UPLOADER' in config.sections():
configUploader = config['UPLOADER']
OPT_WORKERS_N = configUploader.getint('opt_workers', OPT_WORKERS_N)
except (KeyError, configparser.NoSectionError) as err:
bu.error(exception=err)
try:
if 'WG' in config.sections():
configWG = config['WG']
# WG account id of the uploader:
# # Find it here: https://developers.wargaming.net/reference/all/wotb/account/list/
WG_ID = configWG.getint('wg_id', WG_ID)
WG_ACCOUNT = configWG.get('wg_account', WG_ACCOUNT)
## WG API Rules limit 10 request / sec. Higher rate of requests will return errors ==> extra delay
WG_RATE_LIMIT = configWG.getint('wg_rate_limit', WG_RATE_LIMIT)
except (KeyError, configparser.NoSectionError) as err:
bu.error(exception=err)
except Exception as err:
bu.error(exception=err)
parser = argparse.ArgumentParser(description='Post replays(s) to WoTinspector.com and retrieve replay data as JSON')
parser.add_argument('-id', dest='accountID', type=int, default=WG_ID, help='WG account_id')
parser.add_argument('-a', '--account', dest='account', type=str, default=WG_ACCOUNT, help='Uploader\'s WG account name. Format: ACCOUNT_NAME@SERVER')
parser.add_argument('-t','--title', type=str, default=None, help='Title for replays. Use "NN" for continous numbering. Default is automatic naming')
parser.add_argument('-p', '--private', dest="private", action='store_true', default=False, help='Set replays private on WoTinspector.com')
parser.add_argument('--tankopedia', type=str, default='tanks.json', help='JSON file to read Tankopedia from. Default: "tanks.json"')
parser.add_argument('--mapfile', type=str, default='maps.json', help='JSON file to read Blitz map names from. Default: "maps.json"')
parser.add_argument('-d', '--debug', action='store_true', default=False, help='Debug mode')
parser.add_argument('-v', '--verbose', action='store_true', default=False, help='Verbose mode')
parser.add_argument('-s', '--silent', action='store_true', default=False, help='Silent mode')
parser.add_argument('files', metavar='FILE1 [FILE2 ...]', type=str, nargs='+', help='Files to read. Use \'-\' for STDIN"')
args = parser.parse_args()
bu.set_verbose(args.verbose)
bu.set_log_level(args.silent, args.verbose, args.debug)
wg = WG(WG_appID, args.tankopedia, args.mapfile)
wi = WoTinspector(rate_limit=WG_RATE_LIMIT)
if args.account != None:
args.accountID = await wg.get_account_id(args.account)
bu.debug('WG account_id: ' + str(args.accountID))
if args.accountID == None:
args.accountID = 0
try:
queue = asyncio.Queue()
# rebase file arguments due to moving the working directory to the script location
args.files = bu.rebase_file_args(current_dir, args.files)
tasks = []
# Make replay Queue
tasks.append(asyncio.create_task(mkReplayQ(queue, args.files, args.title)))
# Start tasks to process the Queue
for i in range(OPT_WORKERS_N):
tasks.append(asyncio.create_task(replayWorker(queue, i, args.accountID, args.private)))
bu.debug('Task ' + str(i) + ' started')
bu.debug('Waiting for the replay scanner to finish')
await asyncio.wait([tasks[0]])
bu.debug('Scanner finished. Waiting for workers to finish queue')
await queue.join()
bu.debug('Cancelling workers')
for task in tasks:
task.cancel()
bu.debug('Waiting for workers to cancel')
await asyncio.gather(*tasks, return_exceptions=True)
bu.verbose_std(str(REPLAY_N) + ' replays: ' + str(REPLAY_N - SKIPPED_N - ERROR_N) + ' uploaded, ' + str(SKIPPED_N) + ' skipped, ' + str(ERROR_N) + ' errors')
except KeyboardInterrupt:
print('Ctrl-c pressed ...')
sys.exit(1)
finally:
## Need to close the aiohttp.session since Python destructors do not support async methods...
await wg.session.close()
await wi.close()
return None
REPLAY_N = 0
SKIPPED_N = 0
ERROR_N = 0
WIurl = "https://wotinspector.com/api/replay/upload?"
WG_appID = "81381d3f45fa4aa75b78a7198eb216ad"
wg: WG | None = None
wi: WoTinspector | None = None
async def mkReplayQ(queue : asyncio.Queue, files : list, title : str):
"""Create queue of replays to post"""
p_replayfile = re.compile('.*\\.wotbreplay$')
if files[0] == '-':
bu.debug('reading replay file list from STDIN')
stdin, _ = await aioconsole.get_standard_streams()
while True:
line = (await stdin.readline()).decode('utf-8').rstrip()
if not line:
break
else:
if (p_replayfile.match(line) != None):
await queue.put(await mkQueueItem(line, title))
else:
for fn in files:
if fn.endswith('"'):
fn = fn[:-1]
if os.path.isfile(fn) and (p_replayfile.match(fn) != None):
await queue.put(await mkQueueItem(fn, title))
bu.debug('File added to queue: ' + fn)
elif os.path.isdir(fn):
with os.scandir(fn) as dirEntry:
for entry in dirEntry:
try:
bu.debug('Found: ' + entry.name)
if entry.is_file() and (p_replayfile.match(entry.name) != None):
bu.debug(entry.name)
await queue.put(await mkQueueItem(entry.path, title))
bu.debug('File added to queue: ' + entry.path)
except Exception as err:
bu.error(str(err))
else:
bu.error('File not found: ' + fn)
bu.debug('Finished')
return None
async def main(argv) -> int:
global wg, wi
current_dir = os.getcwd()
# set the directory for the script
os.chdir(os.path.dirname(sys.argv[0]))
# options defaults
OPT_WORKERS_N = 2
WG_ID = None
WG_ACCOUNT = None # format: nick@server, where server is either 'eu', 'ru', 'na', 'asia' or 'china'.
# China is not supported since WG API stats are not available there
WG_RATE_LIMIT = 10
try:
## Read config
if os.path.isfile(FILE_CONFIG):
bu.debug("Reading config file: " + FILE_CONFIG)
config = configparser.ConfigParser()
config.read(FILE_CONFIG)
try:
if "WG" in config.sections():
configWG = config["WG"]
# WG account id of the uploader:
# # Find it here: https://developers.wargaming.net/reference/all/wotb/account/list/
WG_ID = configWG.getint("wg_id", WG_ID)
WG_ACCOUNT = configWG.get("wg_account", WG_ACCOUNT)
## WG API Rules limit 10 request / sec. Higher rate of requests will return errors ==> extra delay
WG_RATE_LIMIT = configWG.getint("wg_rate_limit", WG_RATE_LIMIT)
except (KeyError, configparser.NoSectionError) as err:
bu.error(exception=err)
except Exception as err:
bu.error(exception=err)
parser = argparse.ArgumentParser(
description="Post replays(s) to WoTinspector.com and retrieve replay data as JSON"
)
parser.add_argument(
"-id", dest="accountID", type=int, default=WG_ID, help="WG account_id"
)
parser.add_argument(
"-a",
"--account",
dest="account",
type=str,
default=WG_ACCOUNT,
help="Uploader's WG account name. Format: ACCOUNT_NAME@SERVER",
)
parser.add_argument(
"-t",
"--title",
type=str,
default=None,
help='Title for replays. Use "NN" for continous numbering. Default is automatic naming',
)
parser.add_argument(
"-p",
"--private",
dest="private",
action="store_true",
default=False,
help="Set replays private on WoTinspector.com",
)
parser.add_argument(
"--tankopedia",
type=str,
default="tanks.json",
help='JSON file to read Tankopedia from. Default: "tanks.json"',
)
parser.add_argument(
"--mapfile",
type=str,
default="maps.json",
help='JSON file to read Blitz map names from. Default: "maps.json"',
)
parser.add_argument(
"-d", "--debug", action="store_true", default=False, help="Debug mode"
)
parser.add_argument(
"-v", "--verbose", action="store_true", default=False, help="Verbose mode"
)
parser.add_argument(
"-s", "--silent", action="store_true", default=False, help="Silent mode"
)
parser.add_argument(
"files",
metavar="FILE1 [FILE2 ...]",
type=str,
nargs="+",
help="Files to read. Use '-' for STDIN\"",
)
args = parser.parse_args()
bu.set_verbose(args.verbose)
bu.set_log_level(args.silent, args.verbose, args.debug)
wg = WG(WG_appID, args.tankopedia, args.mapfile)
wi = WoTinspector()
if args.account is not None:
args.accountID = await wg.get_account_id(args.account)
bu.debug("WG account_id: " + str(args.accountID))
if args.accountID is None:
args.accountID = 0
try:
queue: asyncio.Queue = asyncio.Queue()
# rebase file arguments due to moving the working directory to the script location
bu.verbose_std("replays.wotinspector.com rate limits replays to 6 / minute")
args.files = bu.rebase_file_args(current_dir, args.files)
tasks = []
# Make replay Queue
tasks.append(asyncio.create_task(mkReplayQ(queue, args.files, args.title)))
# Start tasks to process the Queue
for i in range(OPT_WORKERS_N):
tasks.append(
asyncio.create_task(
replayWorker(queue, i, args.accountID, args.private)
)
)
bu.debug("Task " + str(i) + " started")
bu.debug("Waiting for the replay scanner to finish")
await asyncio.wait([tasks[0]])
bu.debug("Scanner finished. Waiting for workers to finish queue")
await queue.join()
bu.debug("Cancelling workers")
for task in tasks:
task.cancel()
bu.debug("Waiting for workers to cancel")
await asyncio.gather(*tasks, return_exceptions=True)
bu.verbose_std(
str(REPLAY_N)
+ " replays: "
+ str(REPLAY_N - SKIPPED_N - ERROR_N)
+ " uploaded, "
+ str(SKIPPED_N)
+ " skipped, "
+ str(ERROR_N)
+ " errors"
)
except KeyboardInterrupt:
print("Ctrl-c pressed ...")
sys.exit(1)
finally:
## Need to close the aiohttp.session since Python destructors do not support async methods...
await wg.session.close()
await wi.close()
return 0
async def mkQueueItem(filename : str, title : str) -> list:
"""Make an item to replay queue"""
global REPLAY_N
REPLAY_N +=1
return [filename, REPLAY_N, getTitle(filename, title, REPLAY_N)]
async def mkReplayQ(queue: asyncio.Queue, files: list, title: str):
"""Create queue of replays to post"""
p_replayfile = re.compile(".*\\.wotbreplay$")
if files[0] == "-":
bu.debug("reading replay file list from STDIN")
stdin, _ = await aioconsole.get_standard_streams()
while True:
line = (await stdin.readline()).decode("utf-8").rstrip()
if not line:
break
else:
if p_replayfile.match(line) is not None:
await queue.put(await mkQueueItem(line, title))
else:
for fn in files:
if fn.endswith('"'):
fn = fn[:-1]
if os.path.isfile(fn) and (p_replayfile.match(fn) is not None):
await queue.put(await mkQueueItem(fn, title))
bu.debug("File added to queue: " + fn)
elif os.path.isdir(fn):
with os.scandir(fn) as dirEntry:
for entry in dirEntry:
try:
bu.debug("Found: " + entry.name)
if entry.is_file() and (
p_replayfile.match(entry.name) is not None
):
bu.debug(entry.name)
await queue.put(await mkQueueItem(entry.path, title))
bu.debug("File added to queue: " + entry.path)
except Exception as err:
bu.error(str(err))
else:
bu.error("File not found: " + fn)
bu.debug("Finished")
return None
async def replayWorker(queue: asyncio.Queue, workerID: int, account_id: int, priv = False):
"""Async Worker to process the replay queue"""
global SKIPPED_N
global ERROR_N
while True:
item = await queue.get()
filename = item[0]
N = item[1]
title = item[2]
replay_json_fn = filename + '.json'
msg_str = 'Replay[' + str(N) + ']: '
#bu.debug(msg_str + replay_json_fn)
try:
if os.path.isfile(replay_json_fn):
async with aiofiles.open(replay_json_fn) as fp:
replay_json = json.loads(await fp.read())
#if replay_json['status'] == 'ok':
if wi.chk_JSON_replay(replay_json):
bu.verbose_std(msg_str + title + ' has already been posted. Skipping.' )
else:
os.remove(replay_json_fn)
bu.debug(msg_str + "Replay JSON not valid: Deleting " + replay_json_fn, id=workerID)
SKIPPED_N += 1
queue.task_done()
continue
except asyncio.CancelledError as err:
raise err
except Exception as err:
bu.error(msg_str + 'Unexpected error: ' + str(type(err)) + ' : '+ str(err))
try:
#bu.debug('Opening file [' + str(N) +']: ' + filename)
async with aiofiles.open(filename,'rb') as fp:
filename = os.path.basename(filename)
bu.debug(msg_str + 'File: ' + filename)
json_resp = await wi.post_replay(await fp.read(), filename, account_id, title, priv, N)
if json_resp != None:
if (await bu.save_JSON(replay_json_fn,json_resp)):
if wi.chk_JSON_replay(json_resp):
if not bu.debug(msg_str + 'Replay saved OK: ' + filename):
bu.verbose_std(msg_str + title + ' posted')
else:
bu.warning(msg_str +'Replay file is not valid: ' + filename)
ERROR_N += 1
else:
bu.error(msg_str + 'Error saving replay: ' + filename)
ERROR_N += 1
else:
bu.error(msg_str + 'Replay file is not valid: ' + filename)
ERROR_N += 1
except Exception as err:
bu.error(msg_str + 'Unexpected Exception: ' + str(type(err)) + ' : ' + str(err) )
bu.debug(msg_str + 'Marking task done')
queue.task_done()
return None
async def mkQueueItem(filename: str, title: str) -> list:
"""Make an item to replay queue"""
global REPLAY_N
REPLAY_N += 1
return [filename, REPLAY_N, getTitle(filename, title, REPLAY_N)]
def getTitle_old(replayfile: str, title: str, i : int) -> str:
global wg
async def replayWorker(
queue: asyncio.Queue, workerID: int, account_id: int, priv=False
):
"""Async Worker to process the replay queue"""
global SKIPPED_N
global ERROR_N
global wi
if title == None:
try:
filename = os.path.basename(replayfile)
bu.debug(filename)
map_usrStrs = wg.get_map_user_strs()
tank_userStrs = wg.get_tank_user_strs()
#p = re.compile('\\d{8}_\\d{4}_(.+)_(' + '|'.join(map_usrStrs) + ')(?:-\\d)?\\.wotbreplay$')
# update 6.2 changed the file name format. Bug fixed 2019-09-09 Jylpah
p = re.compile('\\d{8}_\\d{4}_.*?(' + '|'.join(tank_userStrs) + ')_(' + '|'.join(map_usrStrs) + ')(?:-\\d)?\\.wotbreplay$')
m = p.match(filename)
if (m != None):
if wg.tanks != None:
tank = m.group(1)
if tank in wg.tanks['userStr']:
tank = wg.tanks['userStr'][tank]
else:
bu.error('Tank code: "' + tank + '" not found from Tankopedia (tanks.json)')
else:
tank = m.group(1)
blitz_map = m.group(2)
if blitz_map in wg.maps:
blitz_map = wg.maps[blitz_map]
else:
bu.error('Mapcode: "' + blitz_map + '" not found from map database (maps.json)')
title = tank + ' @ ' + blitz_map
else:
title = re.sub('\\.wotbreplay$', '', filename)
except Exception as err:
bu.error(err)
else:
title.replace('NN', str(i))
return title
assert wi is not None, "wi cannot be None"
while True:
item = await queue.get()
filename = item[0]
N = item[1]
title = item[2]
replay_json_fn = filename + ".json"
msg_str = "Replay[" + str(N) + "]: "
# bu.debug(msg_str + replay_json_fn)
try:
if os.path.isfile(replay_json_fn):
async with aiofiles.open(replay_json_fn) as fp:
replay_json = json.loads(await fp.read())
# if replay_json['status'] == 'ok':
if wi.chk_JSON_replay(replay_json):
bu.verbose_std(
msg_str + title + " has already been posted. Skipping."
)
else:
os.remove(replay_json_fn)
bu.debug(
msg_str
+ "Replay JSON not valid/complete: Deleting "
+ replay_json_fn,
id=workerID,
)
SKIPPED_N += 1
queue.task_done()
continue
except asyncio.CancelledError as err:
raise err
except Exception as err:
bu.error(msg_str + "Unexpected error: " + str(type(err)) + " : " + str(err))
try:
# bu.debug('Opening file [' + str(N) +']: ' + filename)
async with aiofiles.open(filename, "rb") as fp:
filename = os.path.basename(filename)
bu.debug(msg_str + "File: " + filename)
json_resp = await wi.post_replay(
await fp.read(), filename, account_id, title, priv, N
)
if json_resp is not None:
if await bu.save_JSON(replay_json_fn, json_resp):
if wi.chk_JSON_replay(json_resp):
if not bu.debug(msg_str + "Replay saved OK: " + filename):
bu.verbose_std(msg_str + title + " posted")
else:
bu.warning(
msg_str
+ "Replay file is not valid/complete: "
+ filename
)
ERROR_N += 1
else:
bu.error(msg_str + "Error saving replay: " + filename)
ERROR_N += 1
else:
bu.error(msg_str + "Replay file is not valid/complete: " + filename)
ERROR_N += 1
except Exception as err:
bu.error(
msg_str + "Unexpected Exception: " + str(type(err)) + " : " + str(err)
)
bu.debug(msg_str + "Marking task done")
queue.task_done()
return None
def getTitle(replayfile: str, title: str = None, i : int = 0) -> str:
global wg
if title == None:
try:
filename = os.path.basename(replayfile)
bu.debug(filename)
tank = None
map_name = None
# def getTitle_old(replayfile: str, title: str, i: int) -> str:
# global wg
# if title is None:
# try:
# filename = os.path.basename(replayfile)
# bu.debug(filename)
# map_usrStrs = wg.get_map_user_strs()
# tank_userStrs = wg.get_tank_user_strs()
# # p = re.compile('\\d{8}_\\d{4}_(.+)_(' + '|'.join(map_usrStrs) + ')(?:-\\d)?\\.wotbreplay$')
# # update 6.2 changed the file name format. Bug fixed 2019-09-09 Jylpah
# p = re.compile(
# "\\d{8}_\\d{4}_.*?("
# + "|".join(tank_userStrs)
# + ")_("
# + "|".join(map_usrStrs)
# + ")(?:-\\d)?\\.wotbreplay$"
# )
# m = p.match(filename)
# if m is not None:
# if wg.tanks is not None:
# tank = m.group(1)
# if tank in wg.tanks["userStr"]:
# tank = wg.tanks["userStr"][tank]
# else:
# bu.error(
# 'Tank code: "'
# + tank
# + '" not found from Tankopedia (tanks.json)'
# )
# else:
# tank = m.group(1)
# blitz_map = m.group(2)
# if blitz_map in wg.maps:
# blitz_map = wg.maps[blitz_map]
# else:
# bu.error(
# 'Mapcode: "'
# + blitz_map
# + '" not found from map database (maps.json)'
# )
# title = tank + " @ " + blitz_map
# else:
# title = re.sub("\\.wotbreplay$", "", filename)
# except Exception as err:
# bu.error(err)
# else:
# title.replace("NN", str(i))
# return title
def getTitle(replayfile: str, title: str | None = None, i: int = 0) -> str:
global wg
assert wg is not None, "wg must not be None"
if title is None:
try:
filename = os.path.basename(replayfile)
bu.debug(filename)
tank = None
map_name = None
with zipfile.ZipFile(replayfile, "r") as archive:
# bu.debug('Replay file: ' + replayfile + ' opened')
with io.TextIOWrapper(archive.open("meta.json")) as meta:
# bu.debug('Replay file\'s metadata: opened')
try:
metadata_json = json.load(meta)
# player = metadata_json['playerName']
tank_name = wg.get_tank_name(
metadata_json["vehicleCompDescriptor"]
)
map_name = wg.get_map(metadata_json["mapName"])
bu.debug(
"Tank: " + tank_name
if tank_name is not None
else "NOT FOUND IN tanks.json" + " Map: " + map_name
)
except Exception as err:
bu.error(exception=err)
if (tank_name is not None) and (map_name is not None):
title = tank_name + " @ " + map_name
else:
title = re.sub("\\.wotbreplay$", "", filename)
except Exception as err:
bu.error(err)
else:
title.replace("NN", str(i))
bu.debug("Returning: " + title)
return title
with zipfile.ZipFile(replayfile, 'r') as archive:
# bu.debug('Replay file: ' + replayfile + ' opened')
with io.TextIOWrapper(archive.open('meta.json')) as meta:
# bu.debug('Replay file\'s metadata: opened')
try:
metadata_json = json.load(meta)
#player = metadata_json['playerName']
tank = wg.tank_str2name(metadata_json['playerVehicleName'])
map_name = wg.get_map(metadata_json['mapName'])
bu.debug('Tank: ' + tank + ' Map: ' + map_name)
except Exception as err:
bu.error(exception = err)
if (tank != None) and (map_name != None):
title = tank + ' @ ' + map_name
else:
title = re.sub('\\.wotbreplay$', '', filename)
except Exception as err:
bu.error(err)
else:
title.replace('NN', str(i))
bu.debug('Returning: ' + title)
return title
### UNIT TESTS - pytest
# class TestClass:
# def test_getTitle(self):
# #player = "jylpah"
# WG_appID = '81381d3f45fa4aa75b78a7198eb216ad'
# wg = WG(WG_appID, 'tanks.json', 'maps.json')
# tank_name = "T28 Defender" # "A68_T28D"
# map_name = "Yukon" # "idle"
# replay = './test/' + '20201030_2358__jylpah_A_1157485188135816346.wotbreplay'
# res = tank_name + ' @ ' + map_name
# def test_getTitle(self):
# #player = "jylpah"
# WG_appID = '81381d3f45fa4aa75b78a7198eb216ad'
# wg = WG(WG_appID, 'tanks.json', 'maps.json')
# tank_name = "T28 Defender" # "A68_T28D"
# map_name = "Yukon" # "idle"
# replay = './test/' + '20201030_2358__jylpah_A_1157485188135816346.wotbreplay'
# res = tank_name + ' @ ' + map_name
# assert getTitle(replay) == res
# assert getTitle(replay) == res
# @pytest.mark.asyncio
# async def test_getTitle(self):
# #player = "jylpah"
# WG_appID = '81381d3f45fa4aa75b78a7198eb216ad'
# wg = WG(WG_appID, 'tanks.json', 'maps.json')
# tank_name = "T28 Defender" # "A68_T28D"
# map_name = "Yukon" # "idle"
# replay = './test/' + '20201030_2358__jylpah_A_1157485188135816346.wotbreplay'
# res = tank_name + ' @ ' + map_name
# @pytest.mark.asyncio
# async def test_getTitle(self):
# #player = "jylpah"
# WG_appID = '81381d3f45fa4aa75b78a7198eb216ad'
# wg = WG(WG_appID, 'tanks.json', 'maps.json')
# tank_name = "T28 Defender" # "A68_T28D"
# map_name = "Yukon" # "idle"
# replay = './test/' + '20201030_2358__jylpah_A_1157485188135816346.wotbreplay'
# res = tank_name + ' @ ' + map_name
# assert getTitle(replay) == res
# assert getTitle(replay) == res
### main() -------------------------------------------
if __name__ == "__main__":
# To avoid 'Event loop is closed' RuntimeError due to compatibility issue with aiohttp
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
try:
from asyncio import WindowsSelectorEventLoopPolicy
except ImportError:
pass
else:
if not isinstance(asyncio.get_event_loop_policy(), WindowsSelectorEventLoopPolicy):
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
asyncio.run(main(sys.argv[1:]), debug=False)
# To avoid 'Event loop is closed' RuntimeError due to compatibility issue with aiohttp
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
try:
from asyncio import WindowsSelectorEventLoopPolicy
except ImportError:
pass
else:
if not isinstance(
asyncio.get_event_loop_policy(), WindowsSelectorEventLoopPolicy
):
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
asyncio.run(main(sys.argv[1:]), debug=False)