cs2tracker 2.1.1__tar.gz → 2.1.3__tar.gz
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.
- cs2tracker-2.1.3/.flake8 +4 -0
- cs2tracker-2.1.3/.gitignore +9 -0
- cs2tracker-2.1.3/.pylintrc +10 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/PKG-INFO +12 -5
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/README.md +10 -4
- cs2tracker-2.1.3/cs2tracker/__main__.py +14 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker/_version.py +2 -2
- cs2tracker-2.1.3/cs2tracker/application.py +109 -0
- cs2tracker-2.1.3/cs2tracker/constants.py +273 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker/data/config.ini +12 -12
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker/main.py +11 -4
- cs2tracker-2.1.3/cs2tracker/scraper.py +389 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker.egg-info/PKG-INFO +12 -5
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker.egg-info/SOURCES.txt +1 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker.egg-info/requires.txt +1 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/pyproject.toml +2 -2
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/requirements.txt +1 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/setup.cfg +2 -1
- cs2tracker-2.1.1/.flake8 +0 -5
- cs2tracker-2.1.1/.gitignore +0 -3
- cs2tracker-2.1.1/cs2tracker/__main__.py +0 -9
- cs2tracker-2.1.1/cs2tracker/application.py +0 -114
- cs2tracker-2.1.1/cs2tracker/constants.py +0 -272
- cs2tracker-2.1.1/cs2tracker/scraper.py +0 -338
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/.isort.cfg +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/.pre-commit-config.yaml +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/LICENSE.md +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/MANIFEST.in +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker/__init__.py +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker.egg-info/dependency_links.txt +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker.egg-info/entry_points.txt +0 -0
- {cs2tracker-2.1.1 → cs2tracker-2.1.3}/cs2tracker.egg-info/top_level.txt +0 -0
cs2tracker-2.1.3/.flake8
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cs2tracker
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
4
4
|
Summary: Tracking the steam market prices of CS2 items
|
|
5
5
|
Home-page: https://github.com/ashiven/cs2tracker
|
|
6
6
|
Author: Jannik Novak
|
|
@@ -11,6 +11,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE.md
|
|
14
|
+
Requires-Dist: numpy==1.26.4
|
|
14
15
|
Requires-Dist: beautifulsoup4==4.11.1
|
|
15
16
|
Requires-Dist: CurrencyConverter==0.17.9
|
|
16
17
|
Requires-Dist: matplotlib==3.7.0
|
|
@@ -20,16 +21,21 @@ Requires-Dist: tenacity==8.2.2
|
|
|
20
21
|
Requires-Dist: urllib3==2.1.0
|
|
21
22
|
Dynamic: license-file
|
|
22
23
|
|
|
24
|
+
<div align="center">
|
|
25
|
+
|
|
23
26
|
[](https://opensource.org/licenses/MIT)
|
|
27
|
+
[](https://github.com/ashiven/cs2tracker/releases)
|
|
24
28
|
[](https://badge.fury.io/py/cs2tracker)
|
|
29
|
+
[](https://github.com/ashiven/cs2tracker/issues)
|
|
30
|
+
[](https://github.com/ashiven/cs2tracker/pulls)
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
</div>
|
|
25
34
|
|
|
26
35
|
## About
|
|
27
36
|
|
|
28
37
|
**CS2Tracker** is a tool that can be used to keep track of the steam market prices of your CS2 investment.
|
|
29
38
|
|
|
30
|
-

|
|
31
|
-
|
|
32
|
-
|
|
33
39
|
## Getting Started
|
|
34
40
|
|
|
35
41
|
### Prerequisites
|
|
@@ -54,7 +60,8 @@ Dynamic: license-file
|
|
|
54
60
|
|
|
55
61
|
- `Run!` to gather the current market prices of your items and calculate the total amount in USD and EUR.
|
|
56
62
|
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
57
|
-
- `Show History` to see a price chart consisting of past calculations. A new data point
|
|
63
|
+
- `Show History` to see a price chart consisting of past calculations. A new data point is generated once a day upon running the program.
|
|
64
|
+
- `Daily Background Calculation` to automatically run a daily calculation of your investment in the background and save the results such that they can later be viewed via `Show History`.
|
|
58
65
|
- If you want to prevent your requests from being rate limited by the steamcommunity server, register for an API key on [Crawlbase](crawlbase.com) and enter it into the `API_Key` field at the end of the config file. This will route every request through a different proxy server.
|
|
59
66
|
|
|
60
67
|
---
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://github.com/ashiven/cs2tracker/releases)
|
|
2
5
|
[](https://badge.fury.io/py/cs2tracker)
|
|
6
|
+
[](https://github.com/ashiven/cs2tracker/issues)
|
|
7
|
+
[](https://github.com/ashiven/cs2tracker/pulls)
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
</div>
|
|
3
11
|
|
|
4
12
|
## About
|
|
5
13
|
|
|
6
14
|
**CS2Tracker** is a tool that can be used to keep track of the steam market prices of your CS2 investment.
|
|
7
15
|
|
|
8
|
-

|
|
9
|
-
|
|
10
|
-
|
|
11
16
|
## Getting Started
|
|
12
17
|
|
|
13
18
|
### Prerequisites
|
|
@@ -32,7 +37,8 @@
|
|
|
32
37
|
|
|
33
38
|
- `Run!` to gather the current market prices of your items and calculate the total amount in USD and EUR.
|
|
34
39
|
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
35
|
-
- `Show History` to see a price chart consisting of past calculations. A new data point
|
|
40
|
+
- `Show History` to see a price chart consisting of past calculations. A new data point is generated once a day upon running the program.
|
|
41
|
+
- `Daily Background Calculation` to automatically run a daily calculation of your investment in the background and save the results such that they can later be viewed via `Show History`.
|
|
36
42
|
- If you want to prevent your requests from being rate limited by the steamcommunity server, register for an API key on [Crawlbase](crawlbase.com) and enter it into the `API_Key` field at the end of the config file. This will route every request through a different proxy server.
|
|
37
43
|
|
|
38
44
|
---
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import subprocess
|
|
3
|
+
import tkinter as tk
|
|
4
|
+
from typing import cast
|
|
5
|
+
|
|
6
|
+
import matplotlib.pyplot as plt
|
|
7
|
+
from matplotlib.axes import Axes
|
|
8
|
+
from matplotlib.dates import DateFormatter
|
|
9
|
+
|
|
10
|
+
from cs2tracker.constants import CONFIG_FILE, OUTPUT_FILE, TEXT_EDITOR
|
|
11
|
+
from cs2tracker.scraper import Scraper
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Application:
|
|
15
|
+
def __init__(self):
|
|
16
|
+
self.scraper = Scraper()
|
|
17
|
+
|
|
18
|
+
def run(self):
|
|
19
|
+
"""Run the main application window with buttons for scraping prices, editing the
|
|
20
|
+
configuration, showing history in a chart, and editing the log file.
|
|
21
|
+
"""
|
|
22
|
+
application_window = self._configure_window()
|
|
23
|
+
application_window.mainloop()
|
|
24
|
+
|
|
25
|
+
def _configure_window(self):
|
|
26
|
+
"""Configure the main application window layout with buttons for the various
|
|
27
|
+
actions.
|
|
28
|
+
"""
|
|
29
|
+
window = tk.Tk()
|
|
30
|
+
window.title("CS2Tracker")
|
|
31
|
+
window.geometry("450x450")
|
|
32
|
+
|
|
33
|
+
label = tk.Label(window, text="Welcome to CS2Tracker!")
|
|
34
|
+
run_button = tk.Button(window, text="Run!", command=self._scrape_prices)
|
|
35
|
+
edit_button = tk.Button(window, text="Edit Config", command=self._edit_config)
|
|
36
|
+
plot_button = tk.Button(window, text="Show History (Chart)", command=self._draw_plot)
|
|
37
|
+
plot_file_button = tk.Button(
|
|
38
|
+
window, text="Show History (File)", command=self._edit_log_file
|
|
39
|
+
)
|
|
40
|
+
background_checkbox_value = tk.BooleanVar(value=self.scraper.identify_background_task())
|
|
41
|
+
background_checkbox = tk.Checkbutton(
|
|
42
|
+
window,
|
|
43
|
+
text="Daily Background Calculation",
|
|
44
|
+
command=lambda: self._toggle_background_task(background_checkbox_value.get()),
|
|
45
|
+
variable=background_checkbox_value,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
label.grid(row=0, column=0, pady=50, sticky="NSEW")
|
|
49
|
+
run_button.grid(row=1, column=0, pady=10, sticky="NSEW")
|
|
50
|
+
edit_button.grid(row=2, column=0, pady=10, sticky="NSEW")
|
|
51
|
+
plot_button.grid(row=3, column=0, pady=10, sticky="NSEW")
|
|
52
|
+
plot_file_button.grid(row=4, column=0, pady=10, sticky="NSEW")
|
|
53
|
+
background_checkbox.grid(row=5, column=0, pady=10, sticky="NS")
|
|
54
|
+
|
|
55
|
+
window.grid_columnconfigure(0, weight=1)
|
|
56
|
+
window.grid_rowconfigure(1, weight=1)
|
|
57
|
+
window.grid_rowconfigure(2, weight=1)
|
|
58
|
+
window.grid_rowconfigure(3, weight=1)
|
|
59
|
+
window.grid_rowconfigure(4, weight=1)
|
|
60
|
+
window.grid_rowconfigure(5, weight=1)
|
|
61
|
+
|
|
62
|
+
label.grid_configure(sticky="NSEW")
|
|
63
|
+
run_button.grid_configure(sticky="NSEW")
|
|
64
|
+
edit_button.grid_configure(sticky="NSEW")
|
|
65
|
+
plot_button.grid_configure(sticky="NSEW")
|
|
66
|
+
plot_file_button.grid_configure(sticky="NSEW")
|
|
67
|
+
background_checkbox.grid_configure(sticky="NSEW")
|
|
68
|
+
|
|
69
|
+
return window
|
|
70
|
+
|
|
71
|
+
def _scrape_prices(self):
|
|
72
|
+
"""Scrape prices from the configured sources, print the total, and save the
|
|
73
|
+
results to a file.
|
|
74
|
+
"""
|
|
75
|
+
self.scraper.scrape_prices()
|
|
76
|
+
|
|
77
|
+
def _edit_config(self):
|
|
78
|
+
"""Edit the configuration file using the specified text editor."""
|
|
79
|
+
subprocess.call([TEXT_EDITOR, CONFIG_FILE])
|
|
80
|
+
self.scraper.parse_config()
|
|
81
|
+
|
|
82
|
+
def _draw_plot(self):
|
|
83
|
+
"""Draw a plot of the scraped prices over time."""
|
|
84
|
+
dates, dollars, euros = self.scraper.read_price_log()
|
|
85
|
+
|
|
86
|
+
fig, ax_raw = plt.subplots()
|
|
87
|
+
ax = cast(Axes, ax_raw)
|
|
88
|
+
|
|
89
|
+
ax.plot(dates, dollars, label="Dollars")
|
|
90
|
+
ax.plot(dates, euros, label="Euros")
|
|
91
|
+
ax.set_xlabel("Date")
|
|
92
|
+
ax.set_ylabel("Price")
|
|
93
|
+
ax.legend()
|
|
94
|
+
|
|
95
|
+
date_formatter = DateFormatter("%d-%m-%Y")
|
|
96
|
+
ax.xaxis.set_major_formatter(date_formatter)
|
|
97
|
+
fig.autofmt_xdate()
|
|
98
|
+
|
|
99
|
+
plt.show()
|
|
100
|
+
|
|
101
|
+
def _edit_log_file(self):
|
|
102
|
+
"""Opens the file containing past price calculations."""
|
|
103
|
+
if not os.path.isfile(OUTPUT_FILE):
|
|
104
|
+
open(OUTPUT_FILE, "w", encoding="utf-8").close()
|
|
105
|
+
subprocess.call([TEXT_EDITOR, OUTPUT_FILE])
|
|
106
|
+
|
|
107
|
+
def _toggle_background_task(self, enabled: bool):
|
|
108
|
+
"""Toggle whether a daily price calculation should run in the background."""
|
|
109
|
+
self.scraper.toggle_background_task(enabled)
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
TEXT_EDITOR = "notepad" if sys.platform.startswith("win") else "nano"
|
|
5
|
+
PYTHON_EXECUTABLE = sys.executable
|
|
6
|
+
MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
7
|
+
PROJECT_DIR = os.path.dirname(MODULE_DIR)
|
|
8
|
+
OUTPUT_FILE = os.path.join(MODULE_DIR, "data", "output.csv")
|
|
9
|
+
CONFIG_FILE = os.path.join(MODULE_DIR, "data", "config.ini")
|
|
10
|
+
BATCH_FILE = os.path.join(MODULE_DIR, "data", "cs2tracker_scraper.bat")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
RMR_CAPSULES = {
|
|
14
|
+
"page": "https://steamcommunity.com/market/search?q=2020+rmr",
|
|
15
|
+
"items": [
|
|
16
|
+
"https://steamcommunity.com/market/listings/730/2020%20RMR%20Legends",
|
|
17
|
+
"https://steamcommunity.com/market/listings/730/2020%20RMR%20Challengers",
|
|
18
|
+
"https://steamcommunity.com/market/listings/730/2020%20RMR%20Contenders",
|
|
19
|
+
],
|
|
20
|
+
"names": ["RMR Legends", "RMR Challengers", "RMR Contenders"],
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
STOCKHOLM_CAPSULES = {
|
|
24
|
+
"page": "https://steamcommunity.com/market/search?q=stockholm+capsule",
|
|
25
|
+
"items": [
|
|
26
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Legends%20Sticker%20Capsule",
|
|
27
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Challengers%20Sticker%20Capsule",
|
|
28
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Contenders%20Sticker%20Capsule",
|
|
29
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Champions%20Autograph%20Capsule",
|
|
30
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Finalists%20Autograph%20Capsule",
|
|
31
|
+
],
|
|
32
|
+
"names": [
|
|
33
|
+
"Stockholm Legends",
|
|
34
|
+
"Stockholm Challengers",
|
|
35
|
+
"Stockholm Contenders",
|
|
36
|
+
"Stockholm Champions Autographs",
|
|
37
|
+
"Stockholm Finalists Autographs",
|
|
38
|
+
],
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ANTWERP_CAPSULES = {
|
|
42
|
+
"page": "https://steamcommunity.com/market/search?q=antwerp+capsule",
|
|
43
|
+
"items": [
|
|
44
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Sticker%20Capsule",
|
|
45
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Sticker%20Capsule",
|
|
46
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Sticker%20Capsule",
|
|
47
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Champions%20Autograph%20Capsule",
|
|
48
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Autograph%20Capsule",
|
|
49
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Autograph%20Capsule",
|
|
50
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Autograph%20Capsule",
|
|
51
|
+
],
|
|
52
|
+
"names": [
|
|
53
|
+
"Antwerp Legends",
|
|
54
|
+
"Antwerp Challengers",
|
|
55
|
+
"Antwerp Contenders",
|
|
56
|
+
"Antwerp Champions Autographs",
|
|
57
|
+
"Antwerp Challengers Autographs",
|
|
58
|
+
"Antwerp Legends Autographs",
|
|
59
|
+
"Antwerp Contenders Autographs",
|
|
60
|
+
],
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
RIO_CAPSULES = {
|
|
64
|
+
"page": "https://steamcommunity.com/market/search?q=rio+capsule",
|
|
65
|
+
"items": [
|
|
66
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Sticker%20Capsule",
|
|
67
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Sticker%20Capsule",
|
|
68
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Sticker%20Capsule",
|
|
69
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Champions%20Autograph%20Capsule",
|
|
70
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Autograph%20Capsule",
|
|
71
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Autograph%20Capsule",
|
|
72
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Autograph%20Capsule",
|
|
73
|
+
],
|
|
74
|
+
"names": [
|
|
75
|
+
"Rio Legends",
|
|
76
|
+
"Rio Challengers",
|
|
77
|
+
"Rio Contenders",
|
|
78
|
+
"Rio Champions Autographs",
|
|
79
|
+
"Rio Challengers Autographs",
|
|
80
|
+
"Rio Legends Autographs",
|
|
81
|
+
"Rio Contenders Autographs",
|
|
82
|
+
],
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
PARIS_CAPSULES = {
|
|
86
|
+
"page": "https://steamcommunity.com/market/search?q=paris+capsule",
|
|
87
|
+
"items": [
|
|
88
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Sticker%20Capsule",
|
|
89
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Sticker%20Capsule",
|
|
90
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Sticker%20Capsule",
|
|
91
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Champions%20Autograph%20Capsule",
|
|
92
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Autograph%20Capsule",
|
|
93
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Autograph%20Capsule",
|
|
94
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Autograph%20Capsule",
|
|
95
|
+
],
|
|
96
|
+
"names": [
|
|
97
|
+
"Paris Legends",
|
|
98
|
+
"Paris Challengers",
|
|
99
|
+
"Paris Contenders",
|
|
100
|
+
"Paris Champions Autographs",
|
|
101
|
+
"Paris Challengers Autographs",
|
|
102
|
+
"Paris Legends Autographs",
|
|
103
|
+
"Paris Contenders Autographs",
|
|
104
|
+
],
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
COPENHAGEN_CAPSULES = {
|
|
108
|
+
"page": "https://steamcommunity.com/market/search?q=copenhagen+capsule",
|
|
109
|
+
"items": [
|
|
110
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Sticker%20Capsule",
|
|
111
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Sticker%20Capsule",
|
|
112
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Sticker%20Capsule",
|
|
113
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Champions%20Autograph%20Capsule",
|
|
114
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Autograph%20Capsule",
|
|
115
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Autograph%20Capsule",
|
|
116
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Autograph%20Capsule",
|
|
117
|
+
],
|
|
118
|
+
"names": [
|
|
119
|
+
"Copenhagen Legends",
|
|
120
|
+
"Copenhagen Challengers",
|
|
121
|
+
"Copenhagen Contenders",
|
|
122
|
+
"Copenhagen Champions Autographs",
|
|
123
|
+
"Copenhagen Challengers Autographs",
|
|
124
|
+
"Copenhagen Legends Autographs",
|
|
125
|
+
"Copenhagen Contenders Autographs",
|
|
126
|
+
],
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
SHANGHAI_CAPSULES = {
|
|
130
|
+
"page": "https://steamcommunity.com/market/search?q=shanghai+capsule",
|
|
131
|
+
"items": [
|
|
132
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Sticker%20Capsule",
|
|
133
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Sticker%20Capsule",
|
|
134
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Sticker%20Capsule",
|
|
135
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Champions%20Autograph%20Capsule",
|
|
136
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Autograph%20Capsule",
|
|
137
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Autograph%20Capsule",
|
|
138
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Autograph%20Capsule",
|
|
139
|
+
],
|
|
140
|
+
"names": [
|
|
141
|
+
"Shanghai Legends",
|
|
142
|
+
"Shanghai Challengers",
|
|
143
|
+
"Shanghai Contenders",
|
|
144
|
+
"Shanghai Champions Autographs",
|
|
145
|
+
"Shanghai Challengers Autographs",
|
|
146
|
+
"Shanghai Legends Autographs",
|
|
147
|
+
"Shanghai Contenders Autographs",
|
|
148
|
+
],
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
AUSTIN_CAPSULES = {
|
|
152
|
+
"page": "https://steamcommunity.com/market/search?q=austin+capsule",
|
|
153
|
+
"items": [
|
|
154
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Sticker%20Capsule",
|
|
155
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Sticker%20Capsule",
|
|
156
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Sticker%20Capsule",
|
|
157
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Champions%20Autograph%20Capsule",
|
|
158
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Autograph%20Capsule",
|
|
159
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Autograph%20Capsule",
|
|
160
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Autograph%20Capsule",
|
|
161
|
+
],
|
|
162
|
+
"names": [
|
|
163
|
+
"Austin Legends",
|
|
164
|
+
"Austin Challengers",
|
|
165
|
+
"Austin Contenders",
|
|
166
|
+
"Austin Champions Autographs",
|
|
167
|
+
"Austin Challengers Autographs",
|
|
168
|
+
"Austin Legends Autographs",
|
|
169
|
+
"Austin Contenders Autographs",
|
|
170
|
+
],
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
CAPSULE_INFO = {
|
|
174
|
+
"2020 RMR Sticker Capsule": RMR_CAPSULES,
|
|
175
|
+
"Stockholm Sticker Capsule": STOCKHOLM_CAPSULES,
|
|
176
|
+
"Antwerp Sticker Capsule": ANTWERP_CAPSULES,
|
|
177
|
+
"Rio Sticker Capsule": RIO_CAPSULES,
|
|
178
|
+
"Paris Sticker Capsule": PARIS_CAPSULES,
|
|
179
|
+
"Copenhagen Sticker Capsule": COPENHAGEN_CAPSULES,
|
|
180
|
+
"Shanghai Sticker Capsule": SHANGHAI_CAPSULES,
|
|
181
|
+
"Austin Sticker Capsule": AUSTIN_CAPSULES,
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
CASE_PAGES = [
|
|
186
|
+
"https://steamcommunity.com/market/search?q=revolution+case",
|
|
187
|
+
"https://steamcommunity.com/market/search?q=recoil+case",
|
|
188
|
+
"https://steamcommunity.com/market/search?q=dreams+and+nightmares+case",
|
|
189
|
+
"https://steamcommunity.com/market/search?q=operation+riptide+case",
|
|
190
|
+
"https://steamcommunity.com/market/search?q=snakebite+case",
|
|
191
|
+
"https://steamcommunity.com/market/search?q=broken+fang+case",
|
|
192
|
+
"https://steamcommunity.com/market/search?q=fracture+case",
|
|
193
|
+
"https://steamcommunity.com/market/search?q=chroma+case",
|
|
194
|
+
"https://steamcommunity.com/market/search?q=chroma+case",
|
|
195
|
+
"https://steamcommunity.com/market/search?q=chroma+case",
|
|
196
|
+
"https://steamcommunity.com/market/search?q=clutch+case",
|
|
197
|
+
"https://steamcommunity.com/market/search?q=csgo+weapon+case",
|
|
198
|
+
"https://steamcommunity.com/market/search?q=csgo+weapon+case",
|
|
199
|
+
"https://steamcommunity.com/market/search?q=csgo+weapon+case",
|
|
200
|
+
"https://steamcommunity.com/market/search?q=cs20+case",
|
|
201
|
+
"https://steamcommunity.com/market/search?q=danger+zone+case",
|
|
202
|
+
"https://steamcommunity.com/market/search?q=esports+case",
|
|
203
|
+
"https://steamcommunity.com/market/search?q=esports+case",
|
|
204
|
+
"https://steamcommunity.com/market/search?q=esports+case",
|
|
205
|
+
"https://steamcommunity.com/market/search?q=falchion+case",
|
|
206
|
+
"https://steamcommunity.com/market/search?q=gamma+case",
|
|
207
|
+
"https://steamcommunity.com/market/search?q=gamma+case",
|
|
208
|
+
"https://steamcommunity.com/market/search?q=glove+case",
|
|
209
|
+
"https://steamcommunity.com/market/search?q=horizon+case",
|
|
210
|
+
"https://steamcommunity.com/market/search?q=huntsman+weapon+case",
|
|
211
|
+
"https://steamcommunity.com/market/search?q=operation+bravo+case",
|
|
212
|
+
"https://steamcommunity.com/market/search?q=operation+breakout+case",
|
|
213
|
+
"https://steamcommunity.com/market/search?q=operation+hydra+case",
|
|
214
|
+
"https://steamcommunity.com/market/search?q=operation+phoenix+case",
|
|
215
|
+
"https://steamcommunity.com/market/search?q=operation+vanguard+case",
|
|
216
|
+
"https://steamcommunity.com/market/search?q=operation+wildfire+case",
|
|
217
|
+
"https://steamcommunity.com/market/search?q=prisma+case",
|
|
218
|
+
"https://steamcommunity.com/market/search?q=prisma+case",
|
|
219
|
+
"https://steamcommunity.com/market/search?q=revolver+case",
|
|
220
|
+
"https://steamcommunity.com/market/search?q=shadow+case",
|
|
221
|
+
"https://steamcommunity.com/market/search?q=shattered+web+case",
|
|
222
|
+
"https://steamcommunity.com/market/search?q=spectrum+case",
|
|
223
|
+
"https://steamcommunity.com/market/search?q=spectrum+case",
|
|
224
|
+
"https://steamcommunity.com/market/search?q=winter+offensive+case",
|
|
225
|
+
"https://steamcommunity.com/market/search?q=kilowatt+case",
|
|
226
|
+
"https://steamcommunity.com/market/search?q=gallery+case",
|
|
227
|
+
"https://steamcommunity.com/market/search?q=fever+case",
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
CASE_HREFS = [
|
|
231
|
+
"https://steamcommunity.com/market/listings/730/Revolution%20Case",
|
|
232
|
+
"https://steamcommunity.com/market/listings/730/Recoil%20Case",
|
|
233
|
+
"https://steamcommunity.com/market/listings/730/Dreams%20%26%20Nightmares%20Case",
|
|
234
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Riptide%20Case",
|
|
235
|
+
"https://steamcommunity.com/market/listings/730/Snakebite%20Case",
|
|
236
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Broken%20Fang%20Case",
|
|
237
|
+
"https://steamcommunity.com/market/listings/730/Fracture%20Case",
|
|
238
|
+
"https://steamcommunity.com/market/listings/730/Chroma%20Case",
|
|
239
|
+
"https://steamcommunity.com/market/listings/730/Chroma%202%20Case",
|
|
240
|
+
"https://steamcommunity.com/market/listings/730/Chroma%203%20Case",
|
|
241
|
+
"https://steamcommunity.com/market/listings/730/Clutch%20Case",
|
|
242
|
+
"https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case",
|
|
243
|
+
"https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%202",
|
|
244
|
+
"https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%203",
|
|
245
|
+
"https://steamcommunity.com/market/listings/730/CS20%20Case",
|
|
246
|
+
"https://steamcommunity.com/market/listings/730/Danger%20Zone%20Case",
|
|
247
|
+
"https://steamcommunity.com/market/listings/730/eSports%202013%20Case",
|
|
248
|
+
"https://steamcommunity.com/market/listings/730/eSports%202013%20Winter%20Case",
|
|
249
|
+
"https://steamcommunity.com/market/listings/730/eSports%202014%20Summer%20Case",
|
|
250
|
+
"https://steamcommunity.com/market/listings/730/Falchion%20Case",
|
|
251
|
+
"https://steamcommunity.com/market/listings/730/Gamma%20Case",
|
|
252
|
+
"https://steamcommunity.com/market/listings/730/Gamma%202%20Case",
|
|
253
|
+
"https://steamcommunity.com/market/listings/730/Glove%20Case",
|
|
254
|
+
"https://steamcommunity.com/market/listings/730/Horizon%20Case",
|
|
255
|
+
"https://steamcommunity.com/market/listings/730/Huntsman%20Weapon%20Case",
|
|
256
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Bravo%20Case",
|
|
257
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Breakout%20Weapon%20Case",
|
|
258
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Hydra%20Case",
|
|
259
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Phoenix%20Weapon%20Case",
|
|
260
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Vanguard%20Weapon%20Case",
|
|
261
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Wildfire%20Case",
|
|
262
|
+
"https://steamcommunity.com/market/listings/730/Prisma%20Case",
|
|
263
|
+
"https://steamcommunity.com/market/listings/730/Prisma%202%20Case",
|
|
264
|
+
"https://steamcommunity.com/market/listings/730/Revolver%20Case",
|
|
265
|
+
"https://steamcommunity.com/market/listings/730/Shadow%20Case",
|
|
266
|
+
"https://steamcommunity.com/market/listings/730/Shattered%20Web%20Case",
|
|
267
|
+
"https://steamcommunity.com/market/listings/730/Spectrum%20Case",
|
|
268
|
+
"https://steamcommunity.com/market/listings/730/Spectrum%202%20Case",
|
|
269
|
+
"https://steamcommunity.com/market/listings/730/Winter%20Offensive%20Weapon%20Case",
|
|
270
|
+
"https://steamcommunity.com/market/listings/730/Kilowatt%20Case",
|
|
271
|
+
"https://steamcommunity.com/market/listings/730/Gallery%20Case",
|
|
272
|
+
"https://steamcommunity.com/market/listings/730/Fever%20Case",
|
|
273
|
+
]
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
[
|
|
1
|
+
[Settings]
|
|
2
|
+
Use_Proxy = False
|
|
3
|
+
API_Key = None
|
|
4
|
+
|
|
5
|
+
[2020 RMR Sticker Capsule]
|
|
2
6
|
RMR_Challengers = 0
|
|
3
7
|
RMR_Legends = 0
|
|
4
8
|
RMR_Contenders = 0
|
|
5
9
|
|
|
6
|
-
[Stockholm]
|
|
10
|
+
[Stockholm Sticker Capsule]
|
|
7
11
|
Stockholm_Challengers = 0
|
|
8
12
|
Stockholm_Legends = 0
|
|
9
13
|
Stockholm_Contenders = 0
|
|
10
14
|
Stockholm_Champions_Autographs = 0
|
|
11
15
|
Stockholm_Finalists_Autographs = 0
|
|
12
16
|
|
|
13
|
-
[Antwerp]
|
|
17
|
+
[Antwerp Sticker Capsule]
|
|
14
18
|
Antwerp_Challengers = 0
|
|
15
19
|
Antwerp_Legends = 0
|
|
16
20
|
Antwerp_Contenders = 0
|
|
@@ -19,7 +23,7 @@ Antwerp_Contenders_Autographs = 0
|
|
|
19
23
|
Antwerp_Challengers_Autographs = 0
|
|
20
24
|
Antwerp_Legends_Autographs = 0
|
|
21
25
|
|
|
22
|
-
[Rio]
|
|
26
|
+
[Rio Sticker Capsule]
|
|
23
27
|
Rio_Challengers = 0
|
|
24
28
|
Rio_Legends = 0
|
|
25
29
|
Rio_Contenders = 0
|
|
@@ -28,7 +32,7 @@ Rio_Contenders_Autographs = 0
|
|
|
28
32
|
Rio_Challengers_Autographs = 0
|
|
29
33
|
Rio_Legends_Autographs = 0
|
|
30
34
|
|
|
31
|
-
[Paris]
|
|
35
|
+
[Paris Sticker Capsule]
|
|
32
36
|
Paris_Challengers = 0
|
|
33
37
|
Paris_Legends = 0
|
|
34
38
|
Paris_Contenders = 0
|
|
@@ -37,7 +41,7 @@ Paris_Contenders_Autographs = 0
|
|
|
37
41
|
Paris_Challengers_Autographs = 0
|
|
38
42
|
Paris_Legends_Autographs = 0
|
|
39
43
|
|
|
40
|
-
[Copenhagen]
|
|
44
|
+
[Copenhagen Sticker Capsule]
|
|
41
45
|
Copenhagen_Challengers = 0
|
|
42
46
|
Copenhagen_Legends = 0
|
|
43
47
|
Copenhagen_Contenders = 0
|
|
@@ -46,7 +50,7 @@ Copenhagen_Contenders_Autographs = 0
|
|
|
46
50
|
Copenhagen_Challengers_Autographs = 0
|
|
47
51
|
Copenhagen_Legends_Autographs = 0
|
|
48
52
|
|
|
49
|
-
[Shanghai]
|
|
53
|
+
[Shanghai Sticker Capsule]
|
|
50
54
|
Shanghai_Challengers = 0
|
|
51
55
|
Shanghai_Legends = 0
|
|
52
56
|
Shanghai_Contenders = 0
|
|
@@ -55,7 +59,7 @@ Shanghai_Contenders_Autographs = 0
|
|
|
55
59
|
Shanghai_Challengers_Autographs = 0
|
|
56
60
|
Shanghai_Legends_Autographs = 0
|
|
57
61
|
|
|
58
|
-
[Austin]
|
|
62
|
+
[Austin Sticker Capsule]
|
|
59
63
|
Austin_Challengers = 0
|
|
60
64
|
Austin_Legends = 0
|
|
61
65
|
Austin_Contenders = 0
|
|
@@ -107,7 +111,3 @@ Winter_Offensive_Case = 0
|
|
|
107
111
|
Kilowatt_Case = 0
|
|
108
112
|
Gallery_Case = 0
|
|
109
113
|
Fever_Case = 0
|
|
110
|
-
|
|
111
|
-
[Proxy API Key]
|
|
112
|
-
Use_Proxy = False
|
|
113
|
-
API_Key = None
|
|
@@ -3,12 +3,19 @@ from datetime import datetime
|
|
|
3
3
|
import urllib3
|
|
4
4
|
from rich.console import Console
|
|
5
5
|
|
|
6
|
-
from ._version import version
|
|
7
|
-
from .application import Application
|
|
6
|
+
from cs2tracker._version import version # pylint: disable=E0611
|
|
7
|
+
from cs2tracker.application import Application
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def main():
|
|
11
|
-
|
|
11
|
+
"""
|
|
12
|
+
The main entry point for the CS2Tracker application.
|
|
13
|
+
|
|
14
|
+
Provides a console output with the application version and date, and initializes the
|
|
15
|
+
application.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
# Disable warnings for proxy requests
|
|
12
19
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
13
20
|
|
|
14
21
|
console = Console()
|
|
@@ -25,7 +32,7 @@ def main():
|
|
|
25
32
|
|
|
26
33
|
|
|
27
34
|
"""
|
|
28
|
-
+ f"Version: v{version} - {datetime.today().strftime('%Y/%m/%d')} - Jannik Novak @
|
|
35
|
+
+ f"Version: v{version} - {datetime.today().strftime('%Y/%m/%d')} - Jannik Novak @ashiven\n"
|
|
29
36
|
)
|
|
30
37
|
|
|
31
38
|
application = Application()
|