cs2tracker 2.1.12__py3-none-any.whl → 2.1.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cs2tracker might be problematic. Click here for more details.

@@ -1,9 +1,11 @@
1
1
  import csv
2
- from tkinter import ttk
2
+ from tkinter import messagebox, ttk
3
3
  from tkinter.filedialog import asksaveasfilename
4
4
 
5
5
  from tksheet import Sheet
6
6
 
7
+ from cs2tracker.scraper.scraper import ParsingError
8
+
7
9
 
8
10
  class ScraperFrame(ttk.Frame):
9
11
  def __init__(self, parent, scraper, sheet_size, dark_theme):
@@ -23,26 +25,57 @@ class ScraperFrame(ttk.Frame):
23
25
  self._configure_sheet()
24
26
  self.sheet.pack()
25
27
 
28
+ def _readjust_sheet_size_with_window_size(self, event):
29
+ """Ensures that the sheet resizes with the window."""
30
+ if event.widget == self.parent:
31
+ width, height = event.width, event.height
32
+ if width != self.sheet_width or height != self.sheet_height:
33
+ self.sheet_width = width
34
+ self.sheet_height = height
35
+ self.sheet.height_and_width(height, width)
36
+ self.parent.update()
37
+ self.parent.update_idletasks()
38
+
26
39
  def _configure_sheet(self):
27
40
  """Configure the sheet widget with initial data and settings."""
28
41
  self.sheet = Sheet( # pylint: disable=attribute-defined-outside-init
29
42
  self,
30
43
  data=[],
31
- theme="light" if self.dark_theme else "dark",
44
+ theme="light" if self.dark_theme else "dark", # This is on purpose to add contrast
32
45
  height=self.sheet_height,
33
46
  width=self.sheet_width,
34
47
  auto_resize_columns=150,
48
+ default_column_width=150,
35
49
  sticky="nsew",
36
50
  )
37
51
  self.sheet.enable_bindings()
52
+
53
+ source_titles = []
54
+ for price_source in self.scraper.parser.SOURCES:
55
+ source_titles += [
56
+ f"{price_source.value.title()} (USD)",
57
+ f"{price_source.value.title()} Owned (USD)",
58
+ ]
38
59
  self.sheet.insert_row(
39
- ["Item Name", "Item Owned", "Steam Market Price (USD)", "Total Value Owned (USD)"]
60
+ [
61
+ "Item Name",
62
+ "Item Owned",
63
+ ]
64
+ + source_titles
40
65
  )
41
- self.sheet.column_width(0, 220)
42
- self.sheet.column_width(1, 20)
43
66
  self.sheet.align_rows([0], "c")
44
- self.sheet.align_columns([1, 2, 3], "c")
67
+
68
+ price_columns = list(range(2 * len(self.scraper.parser.SOURCES)))
69
+ price_columns = [1] + [column_index + 2 for column_index in price_columns]
70
+ self.sheet.align_columns(price_columns, "c")
71
+ self.sheet.column_width(0, 220)
72
+
73
+ required_window_width = 220 + 150 * len(price_columns)
74
+ if int(self.sheet_width) < required_window_width:
75
+ self.parent.geometry(f"{required_window_width}x{self.sheet_height}")
76
+
45
77
  self.sheet.popup_menu_add_command("Save Sheet", self._save_sheet)
78
+ self.parent.bind("<Configure>", self._readjust_sheet_size_with_window_size)
46
79
 
47
80
  def _save_sheet(self):
48
81
  """Export the current sheet data to a CSV file."""
@@ -71,6 +104,7 @@ class ScraperFrame(ttk.Frame):
71
104
 
72
105
  self.scraper.scrape_prices(update_sheet_callback)
73
106
 
74
- row_heights = self.sheet.get_row_heights()
75
- last_row_index = len(row_heights) - 1
76
- self.sheet.align_rows(last_row_index, "c")
107
+ if self.scraper.error_stack:
108
+ last_error = self.scraper.error_stack[-1]
109
+ if not isinstance(last_error, ParsingError):
110
+ messagebox.showerror("An Error Occurred", f"{last_error.message}", parent=self)
cs2tracker/constants.py CHANGED
@@ -3,6 +3,9 @@ import os
3
3
  import sys
4
4
  from datetime import datetime
5
5
  from shutil import copy
6
+ from subprocess import DEVNULL
7
+
8
+ from nodejs import npm
6
9
 
7
10
  try:
8
11
  from cs2tracker._version import version # pylint: disable=E0611
@@ -27,18 +30,20 @@ if RUNNING_IN_EXE:
27
30
  MEIPASS_DIR = sys._MEIPASS # type: ignore pylint: disable=protected-access
28
31
  MODULE_DIR = MEIPASS_DIR
29
32
  PROJECT_DIR = MEIPASS_DIR
30
- ICON_FILE = os.path.join(PROJECT_DIR, "assets", "icon.png")
31
- CONFIG_FILE_SOURCE = os.path.join(MODULE_DIR, "data", "config.ini")
32
- OUTPUT_FILE_SOURCE = os.path.join(MODULE_DIR, "data", "output.csv")
33
-
34
33
  APP_DATA_DIR = os.path.join(os.path.expanduser("~"), "AppData", "Local")
35
34
  DATA_DIR = os.path.join(APP_DATA_DIR, "cs2tracker", "data")
36
35
  os.makedirs(DATA_DIR, exist_ok=True)
37
36
 
37
+ CONFIG_FILE_SOURCE = os.path.join(MODULE_DIR, "data", "config.ini")
38
+ OUTPUT_FILE_SOURCE = os.path.join(MODULE_DIR, "data", "output.csv")
39
+ IVENTORY_CONVERT_SCRIPT_SOURCE = os.path.join(MODULE_DIR, "data", "convert_inventory.js")
40
+ INVENTORY_IMPORT_SCRIPT_SOURCE = os.path.join(MODULE_DIR, "data", "get_inventory.js")
41
+
38
42
  CONFIG_FILE = os.path.join(DATA_DIR, "config.ini")
39
43
  CONFIG_FILE_BACKUP = os.path.join(DATA_DIR, "config.ini.bak")
40
44
  OUTPUT_FILE = os.path.join(DATA_DIR, "output.csv")
41
- BATCH_FILE = os.path.join(DATA_DIR, "cs2tracker_scraper.bat")
45
+ IVENTORY_CONVERT_SCRIPT = os.path.join(DATA_DIR, "convert_inventory.js")
46
+ INVENTORY_IMPORT_SCRIPT = os.path.join(DATA_DIR, "get_inventory.js")
42
47
 
43
48
  # Always copy the source config into the user data directory as a backup
44
49
  # and overwrite the existing backup if it exists
@@ -49,20 +54,48 @@ if RUNNING_IN_EXE:
49
54
  copy(OUTPUT_FILE_SOURCE, OUTPUT_FILE)
50
55
  if not os.path.exists(CONFIG_FILE):
51
56
  copy(CONFIG_FILE_SOURCE, CONFIG_FILE)
57
+ if not os.path.exists(IVENTORY_CONVERT_SCRIPT):
58
+ copy(IVENTORY_CONVERT_SCRIPT_SOURCE, IVENTORY_CONVERT_SCRIPT)
59
+ if not os.path.exists(INVENTORY_IMPORT_SCRIPT):
60
+ copy(INVENTORY_IMPORT_SCRIPT_SOURCE, INVENTORY_IMPORT_SCRIPT)
52
61
 
53
62
  else:
54
63
  MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
55
64
  PROJECT_DIR = os.path.dirname(MODULE_DIR)
56
- ICON_FILE = os.path.join(PROJECT_DIR, "assets", "icon.png")
57
- CONFIG_FILE = os.path.join(MODULE_DIR, "data", "config.ini")
58
- CONFIG_FILE_BACKUP = os.path.join(MODULE_DIR, "data", "config.ini.bak")
59
- OUTPUT_FILE = os.path.join(MODULE_DIR, "data", "output.csv")
60
- BATCH_FILE = os.path.join(MODULE_DIR, "data", "cs2tracker_scraper.bat")
65
+ DATA_DIR = os.path.join(MODULE_DIR, "data")
66
+
67
+ CONFIG_FILE = os.path.join(DATA_DIR, "config.ini")
68
+ CONFIG_FILE_BACKUP = os.path.join(DATA_DIR, "config.ini.bak")
69
+ OUTPUT_FILE = os.path.join(DATA_DIR, "output.csv")
70
+ INVENTORY_CONVERT_SCRIPT = os.path.join(DATA_DIR, "convert_inventory.js")
71
+ INVENTORY_IMPORT_SCRIPT = os.path.join(DATA_DIR, "get_inventory.js")
61
72
 
62
73
  if not os.path.exists(CONFIG_FILE_BACKUP):
63
74
  copy(CONFIG_FILE, CONFIG_FILE_BACKUP)
64
75
 
65
76
 
77
+ ICON_FILE = os.path.join(PROJECT_DIR, "assets", "icon.png")
78
+ BATCH_FILE = os.path.join(DATA_DIR, "cs2tracker_scraper.bat")
79
+ INVENTORY_IMPORT_FILE = os.path.join(DATA_DIR, "inventory.json")
80
+ INVENTORY_IMPORT_SCRIPT_DEPENDENCIES = [
81
+ "steam-user",
82
+ "globaloffensive",
83
+ "@node-steam/vdf",
84
+ "axios",
85
+ ]
86
+
87
+ # Ensures that the necessary node modules are installed if a user wants
88
+ # to import their steam inventory via the cs2tracker/data/get_inventory.js Node.js script.
89
+ if not os.path.exists(os.path.join(DATA_DIR, "node_modules")):
90
+ npm.Popen(
91
+ ["install", "-g", "--prefix", DATA_DIR] + INVENTORY_IMPORT_SCRIPT_DEPENDENCIES,
92
+ stdout=DEVNULL,
93
+ stderr=DEVNULL,
94
+ shell=True,
95
+ cwd=DATA_DIR,
96
+ )
97
+
98
+
66
99
  BANNER = """
67
100
  __ _____ _____ ______ ____ ____ __ __ _ ___ ____
68
101
  / ] / ___/| T| T| \\ / T / ]| l/ ] / _]| \\
@@ -77,445 +110,27 @@ AUTHOR_STRING = (
77
110
  f"Version: {VERSION} - {datetime.today().strftime('%Y/%m/%d')} - Jannik Novak @ashiven\n"
78
111
  )
79
112
 
80
- CASE_HREFS = [
81
- "https://steamcommunity.com/market/listings/730/Revolution%20Case",
82
- "https://steamcommunity.com/market/listings/730/Recoil%20Case",
83
- "https://steamcommunity.com/market/listings/730/Dreams%20%26%20Nightmares%20Case",
84
- "https://steamcommunity.com/market/listings/730/Operation%20Riptide%20Case",
85
- "https://steamcommunity.com/market/listings/730/Snakebite%20Case",
86
- "https://steamcommunity.com/market/listings/730/Operation%20Broken%20Fang%20Case",
87
- "https://steamcommunity.com/market/listings/730/Fracture%20Case",
88
- "https://steamcommunity.com/market/listings/730/Chroma%20Case",
89
- "https://steamcommunity.com/market/listings/730/Chroma%202%20Case",
90
- "https://steamcommunity.com/market/listings/730/Chroma%203%20Case",
91
- "https://steamcommunity.com/market/listings/730/Clutch%20Case",
92
- "https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case",
93
- "https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%202",
94
- "https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%203",
95
- "https://steamcommunity.com/market/listings/730/CS20%20Case",
96
- "https://steamcommunity.com/market/listings/730/Danger%20Zone%20Case",
97
- "https://steamcommunity.com/market/listings/730/eSports%202013%20Case",
98
- "https://steamcommunity.com/market/listings/730/eSports%202013%20Winter%20Case",
99
- "https://steamcommunity.com/market/listings/730/eSports%202014%20Summer%20Case",
100
- "https://steamcommunity.com/market/listings/730/Falchion%20Case",
101
- "https://steamcommunity.com/market/listings/730/Gamma%20Case",
102
- "https://steamcommunity.com/market/listings/730/Gamma%202%20Case",
103
- "https://steamcommunity.com/market/listings/730/Glove%20Case",
104
- "https://steamcommunity.com/market/listings/730/Horizon%20Case",
105
- "https://steamcommunity.com/market/listings/730/Huntsman%20Weapon%20Case",
106
- "https://steamcommunity.com/market/listings/730/Operation%20Bravo%20Case",
107
- "https://steamcommunity.com/market/listings/730/Operation%20Breakout%20Weapon%20Case",
108
- "https://steamcommunity.com/market/listings/730/Operation%20Hydra%20Case",
109
- "https://steamcommunity.com/market/listings/730/Operation%20Phoenix%20Weapon%20Case",
110
- "https://steamcommunity.com/market/listings/730/Operation%20Vanguard%20Weapon%20Case",
111
- "https://steamcommunity.com/market/listings/730/Operation%20Wildfire%20Case",
112
- "https://steamcommunity.com/market/listings/730/Prisma%20Case",
113
- "https://steamcommunity.com/market/listings/730/Prisma%202%20Case",
114
- "https://steamcommunity.com/market/listings/730/Revolver%20Case",
115
- "https://steamcommunity.com/market/listings/730/Shadow%20Case",
116
- "https://steamcommunity.com/market/listings/730/Shattered%20Web%20Case",
117
- "https://steamcommunity.com/market/listings/730/Spectrum%20Case",
118
- "https://steamcommunity.com/market/listings/730/Spectrum%202%20Case",
119
- "https://steamcommunity.com/market/listings/730/Winter%20Offensive%20Weapon%20Case",
120
- "https://steamcommunity.com/market/listings/730/Kilowatt%20Case",
121
- "https://steamcommunity.com/market/listings/730/Gallery%20Case",
122
- "https://steamcommunity.com/market/listings/730/Fever%20Case",
123
- ]
124
-
125
-
126
- KATOWICE_2014_CAPSULES = {
127
- "page": "https://steamcommunity.com/market/search?q=katowice+2014+legends+challengers",
128
- "items": [
129
- "https://steamcommunity.com/market/listings/730/EMS%20Katowice%202014%20Legends",
130
- "https://steamcommunity.com/market/listings/730/EMS%20Katowice%202014%20Challengers",
131
- ],
132
- "names": ["Katowice 2014 Legends", "Katowice 2014 Challengers"],
133
- }
134
-
135
- COLOGNE_2014_CAPSULES = {
136
- "page": "https://steamcommunity.com/market/search?q=cologne+2014+legends+challengers",
137
- "items": [
138
- "https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202014%20Legends",
139
- "https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202014%20Challengers",
140
- ],
141
- "names": ["Cologne 2014 Legends", "Cologne 2014 Challengers"],
142
- }
143
-
144
- DREAMHACK_2014_CAPSULES = {
145
- "page": "https://steamcommunity.com/market/search?q=dreamhack+2014+legends",
146
- "items": [
147
- "https://steamcommunity.com/market/listings/730/DreamHack%202014%20Legends%20%28Holo-Foil%29"
148
- ],
149
- "names": ["DreamHack 2014 Legends"],
150
- }
151
-
152
- KATOWICE_2015_CAPSULES = {
153
- "page": "https://steamcommunity.com/market/search?q=katowice+2015+legends+challengers",
154
- "items": [
155
- "https://steamcommunity.com/market/listings/730/ESL%20One%20Katowice%202015%20Legends%20%28Holo-Foil%29",
156
- "https://steamcommunity.com/market/listings/730/ESL%20One%20Katowice%202015%20Challengers%20%28Holo-Foil%29",
157
- ],
158
- "names": ["Katowice 2015 Legends", "Katowice 2015 Challengers"],
159
- }
160
-
161
- COLOGNE_2015_CAPSULES = {
162
- "page": "https://steamcommunity.com/market/search?q=cologne+2015+legends+challengers",
163
- "items": [
164
- "https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202015%20Legends%20%28Foil%29",
165
- "https://steamcommunity.com/market/listings/730/ESL%20One%20Cologne%202015%20Challengers%20%28Foil%29",
166
- ],
167
- "names": ["Cologne 2015 Legends", "Cologne 2015 Challengers"],
168
- }
169
-
170
- CLUJ_NAPOCA_2015_CAPSULES = {
171
- "page": "https://steamcommunity.com/market/search?q=cluj+napoca+2015+legends+challengers",
172
- "items": [
173
- "https://steamcommunity.com/market/listings/730/DreamHack%20Cluj-Napoca%202015%20Legends%20%28Foil%29",
174
- "https://steamcommunity.com/market/listings/730/DreamHack%20Cluj-Napoca%202015%20Challengers%20%28Foil%29",
175
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20Cluj-Napoca%202015",
176
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20Cluj-Napoca%202015",
177
- ],
178
- "names": [
179
- "Cluj Napoca 2015 Legends",
180
- "Cluj Napoca 2015 Challengers",
181
- "Cluj Napoca 2015 Legends Autographs",
182
- "Cluj Napoca 2015 Challengers Autographs",
183
- ],
184
- }
185
-
186
- COLUMBUS_2016_CAPSULES = {
187
- "page": "https://steamcommunity.com/market/search?q=columbus+2016+legends+challengers",
188
- "items": [
189
- "https://steamcommunity.com/market/listings/730/MLG%20Columbus%202016%20Legends%20%28Holo-Foil%29",
190
- "https://steamcommunity.com/market/listings/730/MLG%20Columbus%202016%20Challengers%20%28Holo-Foil%29",
191
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20MLG%20Columbus%202016",
192
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20MLG%20Columbus%202016",
193
- ],
194
- "names": [
195
- "Columbus 2016 Legends",
196
- "Columbus 2016 Challengers",
197
- "Columbus 2016 Legends Autographs",
198
- "Columbus 2016 Challengers Autographs",
199
- ],
200
- }
201
-
202
- COLOGNE_2016_CAPSULES = {
203
- "page": "https://steamcommunity.com/market/search?q=cologne+2016+legends+challengers",
204
- "items": [
205
- "https://steamcommunity.com/market/listings/730/Cologne%202016%20Legends%20%28Holo-Foil%29",
206
- "https://steamcommunity.com/market/listings/730/Cologne%202016%20Challengers%20%28Holo-Foil%29",
207
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20Cologne%202016",
208
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20Cologne%202016",
209
- ],
210
- "names": [
211
- "Cologne 2016 Legends",
212
- "Cologne 2016 Challengers",
213
- "Cologne 2016 Legends Autographs",
214
- "Cologne 2016 Challengers Autographs",
215
- ],
216
- }
217
-
218
- ATLANTA_2017_CAPSULES = {
219
- "page": "https://steamcommunity.com/market/search?q=atlanta+2017+legends+challengers",
220
- "items": [
221
- "https://steamcommunity.com/market/listings/730/Atlanta%202017%20Legends%20%28Holo-Foil%29",
222
- "https://steamcommunity.com/market/listings/730/Atlanta%202017%20Challengers%20%28Holo-Foil%29",
223
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Legends%20%28Foil%29%20%7C%20Atlanta%202017",
224
- "https://steamcommunity.com/market/listings/730/Autograph%20Capsule%20%7C%20Challengers%20%28Foil%29%20%7C%20Atlanta%202017",
225
- ],
226
- "names": [
227
- "Atlanta 2017 Legends",
228
- "Atlanta 2017 Challengers",
229
- "Atlanta 2017 Legends Autographs",
230
- "Atlanta 2017 Challengers Autographs",
231
- ],
232
- }
233
-
234
- KRAKOW_2017_CAPSULES = {
235
- "page": "https://steamcommunity.com/market/search?q=krakow+2017+legends+challengers",
236
- "items": [
237
- "https://steamcommunity.com/market/listings/730/Krakow%202017%20Legends%20%28Holo-Foil%29",
238
- "https://steamcommunity.com/market/listings/730/Krakow%202017%20Challengers%20%28Holo-Foil%29",
239
- "https://steamcommunity.com/market/listings/730/Krakow%202017%20Legends%20Autograph%20Capsule",
240
- "https://steamcommunity.com/market/listings/730/Krakow%202017%20Challengers%20Autograph%20Capsule",
241
- ],
242
- "names": [
243
- "Krakow 2017 Legends",
244
- "Krakow 2017 Challengers",
245
- "Krakow 2017 Legends Autographs",
246
- "Krakow 2017 Challengers Autographs",
247
- ],
248
- }
249
-
250
- BOSTON_2018_CAPSULES = {
251
- "page": "https://steamcommunity.com/market/search?q=boston+2018+legends+challengers",
252
- "items": [
253
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Legends%20%28Holo-Foil%29",
254
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20%28Holo-Foil%29",
255
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Returning%20Challengers%20%28Holo-Foil%29",
256
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Attending%20Legends%20%28Holo-Foil%29",
257
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20with%20Flash%20Gaming%20%28Holo-Foil%29",
258
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Legends%20Autograph%20Capsule",
259
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20Autograph%20Capsule",
260
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Returning%20Challengers%20Autograph%20Capsule",
261
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Attending%20Legends%20Autograph%20Capsule",
262
- "https://steamcommunity.com/market/listings/730/Boston%202018%20Minor%20Challengers%20with%20Flash%20Gaming%20Autograph%20Capsule",
263
- ],
264
- "names": [
265
- "Boston 2018 Legends",
266
- "Boston 2018 Minor Challengers",
267
- "Boston 2018 Returning Challengers",
268
- "Boston 2018 Attending Legends",
269
- "Boston 2018 Minor Challengers with Flash Gaming",
270
- "Boston 2018 Legends Autographs",
271
- "Boston 2018 Minor Challengers Autographs",
272
- "Boston 2018 Returning Challengers Autographs",
273
- "Boston 2018 Attending Legends Autographs",
274
- "Boston 2018 Minor Challengers with Flash Gaming Autographs",
275
- ],
276
- }
277
-
278
- LONDON_2018_CAPSULES = {
279
- "page": "https://steamcommunity.com/market/search?q=london+2018+legends+challengers",
280
- "items": [
281
- "https://steamcommunity.com/market/listings/730/London%202018%20Legends%20%28Holo-Foil%29",
282
- "https://steamcommunity.com/market/listings/730/London%202018%20Minor%20Challengers%20%28Holo-Foil%29",
283
- "https://steamcommunity.com/market/listings/730/London%202018%20Returning%20Challengers%20%28Holo-Foil%29",
284
- "https://steamcommunity.com/market/listings/730/London%202018%20Legends%20Autograph%20Capsule",
285
- "https://steamcommunity.com/market/listings/730/London%202018%20Minor%20Challengers%20Autograph%20Capsule",
286
- "https://steamcommunity.com/market/listings/730/London%202018%20Returning%20Challengers%20Autograph%20Capsule",
287
- ],
288
- "names": [
289
- "London 2018 Legends",
290
- "London 2018 Minor Challengers",
291
- "London 2018 Returning Challengers",
292
- "London 2018 Legends Autographs",
293
- "London 2018 Minor Challengers Autographs",
294
- "London 2018 Returning Challengers Autographs",
295
- ],
296
- }
297
-
298
- KATOWICE_2019_CAPSULES = {
299
- "page": "https://steamcommunity.com/market/search?q=katowice+2019+legends+challengers",
300
- "items": [
301
- "https://steamcommunity.com/market/listings/730/Katowice%202019%20Legends%20%28Holo-Foil%29",
302
- "https://steamcommunity.com/market/listings/730/Katowice%202019%20Minor%20Challengers%20%28Holo-Foil%29",
303
- "https://steamcommunity.com/market/listings/730/Katowice%202019%20Returning%20Challengers%20%28Holo-Foil%29",
304
- "https://steamcommunity.com/market/listings/730/Katowice%202019%20Legends%20Autograph%20Capsule",
305
- "https://steamcommunity.com/market/listings/730/Katowice%202019%20Minor%20Challengers%20Autograph%20Capsule",
306
- "https://steamcommunity.com/market/listings/730/Katowice%202019%20Returning%20Challengers%20Autograph%20Capsule",
307
- ],
308
- "names": [
309
- "Katowice 2019 Legends",
310
- "Katowice 2019 Minor Challengers",
311
- "Katowice 2019 Returning Challengers",
312
- "Katowice 2019 Legends Autographs",
313
- "Katowice 2019 Minor Challengers Autographs",
314
- "Katowice 2019 Returning Challengers Autographs",
315
- ],
316
- }
317
-
318
- BERLIN_2019_CAPSULES = {
319
- "page": "https://steamcommunity.com/market/search?q=berlin+2019+legends+challengers",
320
- "items": [
321
- "https://steamcommunity.com/market/listings/730/Berlin%202019%20Legends%20%28Holo-Foil%29",
322
- "https://steamcommunity.com/market/listings/730/Berlin%202019%20Minor%20Challengers%20%28Holo-Foil%29",
323
- "https://steamcommunity.com/market/listings/730/Berlin%202019%20Returning%20Challengers%20%28Holo-Foil%29",
324
- "https://steamcommunity.com/market/listings/730/Berlin%202019%20Legends%20Autograph%20Capsule",
325
- "https://steamcommunity.com/market/listings/730/Berlin%202019%20Minor%20Challengers%20Autograph%20Capsule",
326
- "https://steamcommunity.com/market/listings/730/Berlin%202019%20Returning%20Challengers%20Autograph%20Capsule",
327
- ],
328
- "names": [
329
- "Berlin 2019 Legends",
330
- "Berlin 2019 Minor Challengers",
331
- "Berlin 2019 Returning Challengers",
332
- "Berlin 2019 Legends Autographs",
333
- "Berlin 2019 Minor Challengers Autographs",
334
- "Berlin 2019 Returning Challengers Autographs",
335
- ],
336
- }
337
-
338
- RMR_2020_CAPSULES = {
339
- "page": "https://steamcommunity.com/market/search?q=2020+rmr",
340
- "items": [
341
- "https://steamcommunity.com/market/listings/730/2020%20RMR%20Legends",
342
- "https://steamcommunity.com/market/listings/730/2020%20RMR%20Challengers",
343
- "https://steamcommunity.com/market/listings/730/2020%20RMR%20Contenders",
344
- ],
345
- "names": ["RMR 2020 Legends", "RMR 2020 Challengers", "RMR 2020 Contenders"],
346
- }
347
-
348
- STOCKHOLM_2021_CAPSULES = {
349
- "page": "https://steamcommunity.com/market/search?q=stockholm+capsule",
350
- "items": [
351
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Legends%20Sticker%20Capsule",
352
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Challengers%20Sticker%20Capsule",
353
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Contenders%20Sticker%20Capsule",
354
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Champions%20Autograph%20Capsule",
355
- "https://steamcommunity.com/market/listings/730/Stockholm%202021%20Finalists%20Autograph%20Capsule",
356
- ],
357
- "names": [
358
- "Stockholm 2021 Legends",
359
- "Stockholm 2021 Challengers",
360
- "Stockholm 2021 Contenders",
361
- "Stockholm 2021 Champions Autographs",
362
- "Stockholm 2021 Finalists Autographs",
363
- ],
364
- }
365
-
366
- ANTWERP_2022_CAPSULES = {
367
- "page": "https://steamcommunity.com/market/search?q=antwerp+capsule",
368
- "items": [
369
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Sticker%20Capsule",
370
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Sticker%20Capsule",
371
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Sticker%20Capsule",
372
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Champions%20Autograph%20Capsule",
373
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Autograph%20Capsule",
374
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Autograph%20Capsule",
375
- "https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Autograph%20Capsule",
376
- ],
377
- "names": [
378
- "Antwerp 2022 Legends",
379
- "Antwerp 2022 Challengers",
380
- "Antwerp 2022 Contenders",
381
- "Antwerp 2022 Champions Autographs",
382
- "Antwerp 2022 Challengers Autographs",
383
- "Antwerp 2022 Legends Autographs",
384
- "Antwerp 2022 Contenders Autographs",
385
- ],
386
- }
387
-
388
- RIO_2022_CAPSULES = {
389
- "page": "https://steamcommunity.com/market/search?q=rio+capsule",
390
- "items": [
391
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Sticker%20Capsule",
392
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Sticker%20Capsule",
393
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Sticker%20Capsule",
394
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Champions%20Autograph%20Capsule",
395
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Autograph%20Capsule",
396
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Autograph%20Capsule",
397
- "https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Autograph%20Capsule",
398
- ],
399
- "names": [
400
- "Rio 2022 Legends",
401
- "Rio 2022 Challengers",
402
- "Rio 2022 Contenders",
403
- "Rio 2022 Champions Autographs",
404
- "Rio 2022 Challengers Autographs",
405
- "Rio 2022 Legends Autographs",
406
- "Rio 2022 Contenders Autographs",
407
- ],
408
- }
409
-
410
- PARIS_2023_CAPSULES = {
411
- "page": "https://steamcommunity.com/market/search?q=paris+capsule",
412
- "items": [
413
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Sticker%20Capsule",
414
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Sticker%20Capsule",
415
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Sticker%20Capsule",
416
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Champions%20Autograph%20Capsule",
417
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Autograph%20Capsule",
418
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Autograph%20Capsule",
419
- "https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Autograph%20Capsule",
420
- ],
421
- "names": [
422
- "Paris 2023 Legends",
423
- "Paris 2023 Challengers",
424
- "Paris 2023 Contenders",
425
- "Paris 2023 Champions Autographs",
426
- "Paris 2023 Challengers Autographs",
427
- "Paris 2023 Legends Autographs",
428
- "Paris 2023 Contenders Autographs",
429
- ],
430
- }
431
-
432
- COPENHAGEN_2024_CAPSULES = {
433
- "page": "https://steamcommunity.com/market/search?q=copenhagen+capsule",
434
- "items": [
435
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Sticker%20Capsule",
436
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Sticker%20Capsule",
437
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Sticker%20Capsule",
438
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Champions%20Autograph%20Capsule",
439
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Autograph%20Capsule",
440
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Autograph%20Capsule",
441
- "https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Autograph%20Capsule",
442
- ],
443
- "names": [
444
- "Copenhagen 2024 Legends",
445
- "Copenhagen 2024 Challengers",
446
- "Copenhagen 2024 Contenders",
447
- "Copenhagen 2024 Champions Autographs",
448
- "Copenhagen 2024 Challengers Autographs",
449
- "Copenhagen 2024 Legends Autographs",
450
- "Copenhagen 2024 Contenders Autographs",
451
- ],
452
- }
453
-
454
- SHANGHAI_2024_CAPSULES = {
455
- "page": "https://steamcommunity.com/market/search?q=shanghai+capsule",
456
- "items": [
457
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Sticker%20Capsule",
458
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Sticker%20Capsule",
459
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Sticker%20Capsule",
460
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Champions%20Autograph%20Capsule",
461
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Autograph%20Capsule",
462
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Autograph%20Capsule",
463
- "https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Autograph%20Capsule",
464
- ],
465
- "names": [
466
- "Shanghai 2024 Legends",
467
- "Shanghai 2024 Challengers",
468
- "Shanghai 2024 Contenders",
469
- "Shanghai 2024 Champions Autographs",
470
- "Shanghai 2024 Challengers Autographs",
471
- "Shanghai 2024 Legends Autographs",
472
- "Shanghai 2024 Contenders Autographs",
473
- ],
474
- }
475
-
476
- AUSTIN_2025_CAPSULES = {
477
- "page": "https://steamcommunity.com/market/search?q=austin+capsule",
478
- "items": [
479
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Sticker%20Capsule",
480
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Sticker%20Capsule",
481
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Sticker%20Capsule",
482
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Champions%20Autograph%20Capsule",
483
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Autograph%20Capsule",
484
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Autograph%20Capsule",
485
- "https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Autograph%20Capsule",
486
- ],
487
- "names": [
488
- "Austin 2025 Legends",
489
- "Austin 2025 Challengers",
490
- "Austin 2025 Contenders",
491
- "Austin 2025 Champions Autographs",
492
- "Austin 2025 Challengers Autographs",
493
- "Austin 2025 Legends Autographs",
494
- "Austin 2025 Contenders Autographs",
495
- ],
496
- }
497
-
498
- CAPSULE_INFO = {
499
- "Katowice 2014 Sticker Capsule": KATOWICE_2014_CAPSULES,
500
- "Cologne 2014 Sticker Capsule": COLOGNE_2014_CAPSULES,
501
- "DreamHack 2014 Sticker Capsule": DREAMHACK_2014_CAPSULES,
502
- "Katowice 2015 Sticker Capsule": KATOWICE_2015_CAPSULES,
503
- "Cologne 2015 Sticker Capsule": COLOGNE_2015_CAPSULES,
504
- "Cluj-Napoca 2015 Sticker Capsule": CLUJ_NAPOCA_2015_CAPSULES,
505
- "Columbus 2016 Sticker Capsule": COLUMBUS_2016_CAPSULES,
506
- "Cologne 2016 Sticker Capsule": COLOGNE_2016_CAPSULES,
507
- "Atlanta 2017 Sticker Capsule": ATLANTA_2017_CAPSULES,
508
- "Krakow 2017 Sticker Capsule": KRAKOW_2017_CAPSULES,
509
- "Boston 2018 Sticker Capsule": BOSTON_2018_CAPSULES,
510
- "London 2018 Sticker Capsule": LONDON_2018_CAPSULES,
511
- "Katowice 2019 Sticker Capsule": KATOWICE_2019_CAPSULES,
512
- "Berlin 2019 Sticker Capsule": BERLIN_2019_CAPSULES,
513
- "2020 RMR Sticker Capsule": RMR_2020_CAPSULES,
514
- "Stockholm 2021 Sticker Capsule": STOCKHOLM_2021_CAPSULES,
515
- "Antwerp 2022 Sticker Capsule": ANTWERP_2022_CAPSULES,
516
- "Rio 2022 Sticker Capsule": RIO_2022_CAPSULES,
517
- "Paris 2023 Sticker Capsule": PARIS_2023_CAPSULES,
518
- "Copenhagen 2024 Sticker Capsule": COPENHAGEN_2024_CAPSULES,
519
- "Shanghai 2024 Sticker Capsule": SHANGHAI_2024_CAPSULES,
520
- "Austin 2025 Sticker Capsule": AUSTIN_2025_CAPSULES,
113
+ CAPSULE_PAGES = {
114
+ "Katowice 2014 Sticker Capsule": "https://steamcommunity.com/market/search?q=katowice+2014+legends+challengers",
115
+ "Cologne 2014 Sticker Capsule": "https://steamcommunity.com/market/search?q=cologne+2014+legends+challengers",
116
+ "DreamHack 2014 Sticker Capsule": "https://steamcommunity.com/market/search?q=dreamhack+2014+legends",
117
+ "Katowice 2015 Sticker Capsule": "https://steamcommunity.com/market/search?q=katowice+2015+legends+challengers",
118
+ "Cologne 2015 Sticker Capsule": "https://steamcommunity.com/market/search?q=cologne+2015+legends+challengers",
119
+ "Cluj-Napoca 2015 Sticker Capsule": "https://steamcommunity.com/market/search?q=cluj+napoca+2015+legends+challengers",
120
+ "Columbus 2016 Sticker Capsule": "https://steamcommunity.com/market/search?q=columbus+2016+legends+challengers",
121
+ "Cologne 2016 Sticker Capsule": "https://steamcommunity.com/market/search?q=cologne+2016+legends+challengers",
122
+ "Atlanta 2017 Sticker Capsule": "https://steamcommunity.com/market/search?q=atlanta+2017+legends+challengers",
123
+ "Krakow 2017 Sticker Capsule": "https://steamcommunity.com/market/search?q=krakow+2017+legends+challengers",
124
+ "Boston 2018 Sticker Capsule": "https://steamcommunity.com/market/search?q=boston+2018+legends+challengers",
125
+ "London 2018 Sticker Capsule": "https://steamcommunity.com/market/search?q=london+2018+legends+challengers",
126
+ "Katowice 2019 Sticker Capsule": "https://steamcommunity.com/market/search?q=katowice+2019+legends+challengers",
127
+ "Berlin 2019 Sticker Capsule": "https://steamcommunity.com/market/search?q=berlin+2019+legends+challengers",
128
+ "2020 RMR Sticker Capsule": "https://steamcommunity.com/market/search?q=2020+rmr",
129
+ "Stockholm 2021 Sticker Capsule": "https://steamcommunity.com/market/search?q=stockholm+capsule",
130
+ "Antwerp 2022 Sticker Capsule": "https://steamcommunity.com/market/search?q=antwerp+capsule",
131
+ "Rio 2022 Sticker Capsule": "https://steamcommunity.com/market/search?q=rio+capsule",
132
+ "Paris 2023 Sticker Capsule": "https://steamcommunity.com/market/search?q=paris+capsule",
133
+ "Copenhagen 2024 Sticker Capsule": "https://steamcommunity.com/market/search?q=copenhagen+capsule",
134
+ "Shanghai 2024 Sticker Capsule": "https://steamcommunity.com/market/search?q=shanghai+capsule",
135
+ "Austin 2025 Sticker Capsule": "https://steamcommunity.com/market/search?q=austin+capsule",
521
136
  }