cs2tracker 2.1.0__tar.gz → 2.1.2__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.0 → cs2tracker-2.1.2}/.flake8 +1 -1
- cs2tracker-2.1.2/.gitignore +9 -0
- cs2tracker-2.1.2/.pylintrc +13 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/PKG-INFO +12 -3
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/README.md +10 -2
- cs2tracker-2.1.2/cs2tracker/__main__.py +14 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker/_version.py +2 -2
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker/application.py +32 -53
- cs2tracker-2.1.2/cs2tracker/constants.py +271 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker/data/config.ini +9 -9
- cs2tracker-2.1.2/cs2tracker/main.py +43 -0
- cs2tracker-2.1.2/cs2tracker/scraper.py +305 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker.egg-info/PKG-INFO +12 -3
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker.egg-info/SOURCES.txt +1 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker.egg-info/requires.txt +1 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/pyproject.toml +2 -2
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/requirements.txt +1 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/setup.cfg +2 -1
- cs2tracker-2.1.0/.gitignore +0 -3
- cs2tracker-2.1.0/cs2tracker/__main__.py +0 -9
- cs2tracker-2.1.0/cs2tracker/constants.py +0 -272
- cs2tracker-2.1.0/cs2tracker/main.py +0 -36
- cs2tracker-2.1.0/cs2tracker/scraper.py +0 -348
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/.isort.cfg +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/.pre-commit-config.yaml +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/LICENSE.md +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/MANIFEST.in +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker/__init__.py +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker.egg-info/dependency_links.txt +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker.egg-info/entry_points.txt +0 -0
- {cs2tracker-2.1.0 → cs2tracker-2.1.2}/cs2tracker.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[MESSAGES CONTROL]
|
|
2
|
+
disable=
|
|
3
|
+
too-many-instance-attributes,
|
|
4
|
+
too-many-arguments,
|
|
5
|
+
too-many-positional-arguments,
|
|
6
|
+
too-many-locals,
|
|
7
|
+
line-too-long,
|
|
8
|
+
missing-module-docstring,
|
|
9
|
+
missing-class-docstring,
|
|
10
|
+
too-few-public-methods,
|
|
11
|
+
import-error,
|
|
12
|
+
simplifiable-if-expression,
|
|
13
|
+
consider-using-with
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cs2tracker
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
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,8 +21,16 @@ 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
|
|
|
@@ -49,10 +58,10 @@ Dynamic: license-file
|
|
|
49
58
|
|
|
50
59
|
### Options
|
|
51
60
|
|
|
52
|
-
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
53
61
|
- `Run!` to gather the current market prices of your items and calculate the total amount in USD and EUR.
|
|
62
|
+
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
54
63
|
- `Show History` to see a price chart consisting of past calculations. A new data point for this chart is generated once a day upon running the program.
|
|
55
|
-
- If you want to
|
|
64
|
+
- 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.
|
|
56
65
|
|
|
57
66
|
---
|
|
58
67
|
|
|
@@ -1,5 +1,13 @@
|
|
|
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
|
|
|
@@ -27,10 +35,10 @@
|
|
|
27
35
|
|
|
28
36
|
### Options
|
|
29
37
|
|
|
30
|
-
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
31
38
|
- `Run!` to gather the current market prices of your items and calculate the total amount in USD and EUR.
|
|
39
|
+
- `Edit Config` to change the specific numbers of each item you own and then save the config file.
|
|
32
40
|
- `Show History` to see a price chart consisting of past calculations. A new data point for this chart is generated once a day upon running the program.
|
|
33
|
-
- If you want to
|
|
41
|
+
- 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.
|
|
34
42
|
|
|
35
43
|
---
|
|
36
44
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import csv
|
|
2
|
-
import datetime
|
|
3
1
|
import os
|
|
4
2
|
import subprocess
|
|
5
3
|
import tkinter as tk
|
|
4
|
+
from typing import cast
|
|
6
5
|
|
|
7
6
|
import matplotlib.pyplot as plt
|
|
7
|
+
from matplotlib.axes import Axes
|
|
8
8
|
from matplotlib.dates import DateFormatter
|
|
9
9
|
|
|
10
|
-
from .constants import CONFIG_FILE, OUTPUT_FILE, TEXT_EDITOR
|
|
11
|
-
from .scraper import Scraper
|
|
10
|
+
from cs2tracker.constants import CONFIG_FILE, OUTPUT_FILE, TEXT_EDITOR
|
|
11
|
+
from cs2tracker.scraper import Scraper
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Application:
|
|
@@ -16,6 +16,16 @@ class Application:
|
|
|
16
16
|
self.scraper = Scraper()
|
|
17
17
|
|
|
18
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
|
+
"""
|
|
19
29
|
window = tk.Tk()
|
|
20
30
|
window.title("CS2Tracker")
|
|
21
31
|
window.geometry("400x400")
|
|
@@ -25,12 +35,8 @@ class Application:
|
|
|
25
35
|
|
|
26
36
|
run_button = tk.Button(window, text="Run!", command=self._scrape_prices)
|
|
27
37
|
edit_button = tk.Button(window, text="Edit Config", command=self._edit_config)
|
|
28
|
-
plot_button = tk.Button(
|
|
29
|
-
|
|
30
|
-
)
|
|
31
|
-
plotfile_button = tk.Button(
|
|
32
|
-
window, text="Show History (File)", command=self._plot_file
|
|
33
|
-
)
|
|
38
|
+
plot_button = tk.Button(window, text="Show History (Chart)", command=self._draw_plot)
|
|
39
|
+
plotfile_button = tk.Button(window, text="Show History (File)", command=self._edit_log_file)
|
|
34
40
|
|
|
35
41
|
run_button.grid(row=1, column=0, pady=10, sticky="NSEW")
|
|
36
42
|
edit_button.grid(row=2, column=0, pady=10, sticky="NSEW")
|
|
@@ -48,24 +54,28 @@ class Application:
|
|
|
48
54
|
plot_button.grid_configure(sticky="NSEW")
|
|
49
55
|
plotfile_button.grid_configure(sticky="NSEW")
|
|
50
56
|
|
|
51
|
-
window
|
|
57
|
+
return window
|
|
52
58
|
|
|
53
59
|
def _scrape_prices(self):
|
|
60
|
+
"""Scrape prices from the configured sources, print the total, and save the
|
|
61
|
+
results to a file.
|
|
62
|
+
"""
|
|
54
63
|
self.scraper.scrape_prices()
|
|
55
|
-
self.scraper.print_total()
|
|
56
|
-
self.scraper.save_to_file()
|
|
57
64
|
|
|
58
65
|
def _edit_config(self):
|
|
66
|
+
"""Edit the configuration file using the specified text editor."""
|
|
59
67
|
subprocess.call([TEXT_EDITOR, CONFIG_FILE])
|
|
60
|
-
|
|
61
|
-
self.scraper.set_config(config)
|
|
68
|
+
self.scraper.parse_config()
|
|
62
69
|
|
|
63
70
|
def _draw_plot(self):
|
|
64
|
-
|
|
71
|
+
"""Draw a plot of the scraped prices over time."""
|
|
72
|
+
dates, dollars, euros = self.scraper.read_price_log()
|
|
65
73
|
|
|
66
|
-
fig,
|
|
67
|
-
ax
|
|
68
|
-
|
|
74
|
+
fig, ax_raw = plt.subplots()
|
|
75
|
+
ax = cast(Axes, ax_raw)
|
|
76
|
+
|
|
77
|
+
ax.plot(dates, dollars, label="Dollars")
|
|
78
|
+
ax.plot(dates, euros, label="Euros")
|
|
69
79
|
ax.set_xlabel("Date")
|
|
70
80
|
ax.set_ylabel("Price")
|
|
71
81
|
ax.legend()
|
|
@@ -76,39 +86,8 @@ class Application:
|
|
|
76
86
|
|
|
77
87
|
plt.show()
|
|
78
88
|
|
|
79
|
-
def
|
|
80
|
-
|
|
81
|
-
date_str, price_str = row
|
|
82
|
-
price = float(price_str[:-1])
|
|
83
|
-
return date_str, price
|
|
84
|
-
|
|
85
|
-
dates = []
|
|
86
|
-
dollars = []
|
|
87
|
-
euros = []
|
|
88
|
-
row_num = 0
|
|
89
|
-
|
|
90
|
-
if not os.path.isfile(OUTPUT_FILE):
|
|
91
|
-
open(OUTPUT_FILE, "w").close()
|
|
92
|
-
|
|
93
|
-
with open(OUTPUT_FILE, "r", newline="", encoding="utf-8") as csvfile:
|
|
94
|
-
reader = csv.reader(csvfile)
|
|
95
|
-
for row in reader:
|
|
96
|
-
row_num += 1
|
|
97
|
-
date, price = parse_row(row)
|
|
98
|
-
if row_num % 2 == 0:
|
|
99
|
-
euros.append(price)
|
|
100
|
-
else:
|
|
101
|
-
dollars.append(price)
|
|
102
|
-
dates.append(date)
|
|
103
|
-
|
|
104
|
-
datesp = []
|
|
105
|
-
for date_str in dates:
|
|
106
|
-
date = datetime.datetime.strptime(date_str[:-9], "%Y-%m-%d")
|
|
107
|
-
datesp.append(date)
|
|
108
|
-
|
|
109
|
-
return datesp, dollars, euros
|
|
110
|
-
|
|
111
|
-
def _plot_file(self):
|
|
89
|
+
def _edit_log_file(self):
|
|
90
|
+
"""Opens the file containing past price calculations."""
|
|
112
91
|
if not os.path.isfile(OUTPUT_FILE):
|
|
113
|
-
open(OUTPUT_FILE, "w").close()
|
|
92
|
+
open(OUTPUT_FILE, "w", encoding="utf-8").close()
|
|
114
93
|
subprocess.call([TEXT_EDITOR, OUTPUT_FILE])
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
TEXT_EDITOR = "notepad" if sys.platform == "win32" else "nano"
|
|
5
|
+
BASE_DIR = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/")
|
|
6
|
+
OUTPUT_FILE = f"{BASE_DIR}/data/output.csv"
|
|
7
|
+
CONFIG_FILE = f"{BASE_DIR}/data/config.ini"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
RMR_CAPSULES = {
|
|
11
|
+
"page": "https://steamcommunity.com/market/search?q=2020+rmr",
|
|
12
|
+
"items": [
|
|
13
|
+
"https://steamcommunity.com/market/listings/730/2020%20RMR%20Legends",
|
|
14
|
+
"https://steamcommunity.com/market/listings/730/2020%20RMR%20Challengers",
|
|
15
|
+
"https://steamcommunity.com/market/listings/730/2020%20RMR%20Contenders",
|
|
16
|
+
],
|
|
17
|
+
"names": ["RMR Legends", "RMR Challengers", "RMR Contenders"],
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
STOCKHOLM_CAPSULES = {
|
|
21
|
+
"page": "https://steamcommunity.com/market/search?q=stockholm+capsule",
|
|
22
|
+
"items": [
|
|
23
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Legends%20Sticker%20Capsule",
|
|
24
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Challengers%20Sticker%20Capsule",
|
|
25
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Contenders%20Sticker%20Capsule",
|
|
26
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Champions%20Autograph%20Capsule",
|
|
27
|
+
"https://steamcommunity.com/market/listings/730/Stockholm%202021%20Finalists%20Autograph%20Capsule",
|
|
28
|
+
],
|
|
29
|
+
"names": [
|
|
30
|
+
"Stockholm Legends",
|
|
31
|
+
"Stockholm Challengers",
|
|
32
|
+
"Stockholm Contenders",
|
|
33
|
+
"Stockholm Champions Autographs",
|
|
34
|
+
"Stockholm Finalists Autographs",
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
ANTWERP_CAPSULES = {
|
|
39
|
+
"page": "https://steamcommunity.com/market/search?q=antwerp+capsule",
|
|
40
|
+
"items": [
|
|
41
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Sticker%20Capsule",
|
|
42
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Sticker%20Capsule",
|
|
43
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Sticker%20Capsule",
|
|
44
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Champions%20Autograph%20Capsule",
|
|
45
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Challengers%20Autograph%20Capsule",
|
|
46
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Legends%20Autograph%20Capsule",
|
|
47
|
+
"https://steamcommunity.com/market/listings/730/Antwerp%202022%20Contenders%20Autograph%20Capsule",
|
|
48
|
+
],
|
|
49
|
+
"names": [
|
|
50
|
+
"Antwerp Legends",
|
|
51
|
+
"Antwerp Challengers",
|
|
52
|
+
"Antwerp Contenders",
|
|
53
|
+
"Antwerp Champions Autographs",
|
|
54
|
+
"Antwerp Challengers Autographs",
|
|
55
|
+
"Antwerp Legends Autographs",
|
|
56
|
+
"Antwerp Contenders Autographs",
|
|
57
|
+
],
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
RIO_CAPSULES = {
|
|
61
|
+
"page": "https://steamcommunity.com/market/search?q=rio+capsule",
|
|
62
|
+
"items": [
|
|
63
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Sticker%20Capsule",
|
|
64
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Sticker%20Capsule",
|
|
65
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Sticker%20Capsule",
|
|
66
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Champions%20Autograph%20Capsule",
|
|
67
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Challengers%20Autograph%20Capsule",
|
|
68
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Legends%20Autograph%20Capsule",
|
|
69
|
+
"https://steamcommunity.com/market/listings/730/Rio%202022%20Contenders%20Autograph%20Capsule",
|
|
70
|
+
],
|
|
71
|
+
"names": [
|
|
72
|
+
"Rio Legends",
|
|
73
|
+
"Rio Challengers",
|
|
74
|
+
"Rio Contenders",
|
|
75
|
+
"Rio Champions Autographs",
|
|
76
|
+
"Rio Challengers Autographs",
|
|
77
|
+
"Rio Legends Autographs",
|
|
78
|
+
"Rio Contenders Autographs",
|
|
79
|
+
],
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
PARIS_CAPSULES = {
|
|
83
|
+
"page": "https://steamcommunity.com/market/search?q=paris+capsule",
|
|
84
|
+
"items": [
|
|
85
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Sticker%20Capsule",
|
|
86
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Sticker%20Capsule",
|
|
87
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Sticker%20Capsule",
|
|
88
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Champions%20Autograph%20Capsule",
|
|
89
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Challengers%20Autograph%20Capsule",
|
|
90
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Legends%20Autograph%20Capsule",
|
|
91
|
+
"https://steamcommunity.com/market/listings/730/Paris%202023%20Contenders%20Autograph%20Capsule",
|
|
92
|
+
],
|
|
93
|
+
"names": [
|
|
94
|
+
"Paris Legends",
|
|
95
|
+
"Paris Challengers",
|
|
96
|
+
"Paris Contenders",
|
|
97
|
+
"Paris Champions Autographs",
|
|
98
|
+
"Paris Challengers Autographs",
|
|
99
|
+
"Paris Legends Autographs",
|
|
100
|
+
"Paris Contenders Autographs",
|
|
101
|
+
],
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
COPENHAGEN_CAPSULES = {
|
|
105
|
+
"page": "https://steamcommunity.com/market/search?q=copenhagen+capsule",
|
|
106
|
+
"items": [
|
|
107
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Sticker%20Capsule",
|
|
108
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Sticker%20Capsule",
|
|
109
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Sticker%20Capsule",
|
|
110
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Champions%20Autograph%20Capsule",
|
|
111
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Challengers%20Autograph%20Capsule",
|
|
112
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Legends%20Autograph%20Capsule",
|
|
113
|
+
"https://steamcommunity.com/market/listings/730/Copenhagen%202024%20Contenders%20Autograph%20Capsule",
|
|
114
|
+
],
|
|
115
|
+
"names": [
|
|
116
|
+
"Copenhagen Legends",
|
|
117
|
+
"Copenhagen Challengers",
|
|
118
|
+
"Copenhagen Contenders",
|
|
119
|
+
"Copenhagen Champions Autographs",
|
|
120
|
+
"Copenhagen Challengers Autographs",
|
|
121
|
+
"Copenhagen Legends Autographs",
|
|
122
|
+
"Copenhagen Contenders Autographs",
|
|
123
|
+
],
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
SHANGHAI_CAPSULES = {
|
|
127
|
+
"page": "https://steamcommunity.com/market/search?q=shanghai+capsule",
|
|
128
|
+
"items": [
|
|
129
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Sticker%20Capsule",
|
|
130
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Sticker%20Capsule",
|
|
131
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Sticker%20Capsule",
|
|
132
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Champions%20Autograph%20Capsule",
|
|
133
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Challengers%20Autograph%20Capsule",
|
|
134
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Legends%20Autograph%20Capsule",
|
|
135
|
+
"https://steamcommunity.com/market/listings/730/Shanghai%202024%20Contenders%20Autograph%20Capsule",
|
|
136
|
+
],
|
|
137
|
+
"names": [
|
|
138
|
+
"Shanghai Legends",
|
|
139
|
+
"Shanghai Challengers",
|
|
140
|
+
"Shanghai Contenders",
|
|
141
|
+
"Shanghai Champions Autographs",
|
|
142
|
+
"Shanghai Challengers Autographs",
|
|
143
|
+
"Shanghai Legends Autographs",
|
|
144
|
+
"Shanghai Contenders Autographs",
|
|
145
|
+
],
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
AUSTIN_CAPSULES = {
|
|
150
|
+
"page": "https://steamcommunity.com/market/search?q=austin+capsule",
|
|
151
|
+
"items": [
|
|
152
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Sticker%20Capsule",
|
|
153
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Sticker%20Capsule",
|
|
154
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Sticker%20Capsule",
|
|
155
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Champions%20Autograph%20Capsule",
|
|
156
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Challengers%20Autograph%20Capsule",
|
|
157
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Legends%20Autograph%20Capsule",
|
|
158
|
+
"https://steamcommunity.com/market/listings/730/Austin%202025%20Contenders%20Autograph%20Capsule",
|
|
159
|
+
],
|
|
160
|
+
"names": [
|
|
161
|
+
"Austin Legends",
|
|
162
|
+
"Austin Challengers",
|
|
163
|
+
"Austin Contenders",
|
|
164
|
+
"Austin Champions Autographs",
|
|
165
|
+
"Austin Challengers Autographs",
|
|
166
|
+
"Austin Legends Autographs",
|
|
167
|
+
"Austin Contenders Autographs",
|
|
168
|
+
],
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
CAPSULE_INFO = {
|
|
172
|
+
"2020 RMR Sticker Capsule": RMR_CAPSULES,
|
|
173
|
+
"Stockholm Sticker Capsule": STOCKHOLM_CAPSULES,
|
|
174
|
+
"Antwerp Sticker Capsule": ANTWERP_CAPSULES,
|
|
175
|
+
"Rio Sticker Capsule": RIO_CAPSULES,
|
|
176
|
+
"Paris Sticker Capsule": PARIS_CAPSULES,
|
|
177
|
+
"Copenhagen Sticker Capsule": COPENHAGEN_CAPSULES,
|
|
178
|
+
"Shanghai Sticker Capsule": SHANGHAI_CAPSULES,
|
|
179
|
+
"Austin Sticker Capsule": AUSTIN_CAPSULES,
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
CASE_PAGES = [
|
|
184
|
+
"https://steamcommunity.com/market/search?q=revolution+case",
|
|
185
|
+
"https://steamcommunity.com/market/search?q=recoil+case",
|
|
186
|
+
"https://steamcommunity.com/market/search?q=dreams+and+nightmares+case",
|
|
187
|
+
"https://steamcommunity.com/market/search?q=operation+riptide+case",
|
|
188
|
+
"https://steamcommunity.com/market/search?q=snakebite+case",
|
|
189
|
+
"https://steamcommunity.com/market/search?q=broken+fang+case",
|
|
190
|
+
"https://steamcommunity.com/market/search?q=fracture+case",
|
|
191
|
+
"https://steamcommunity.com/market/search?q=chroma+case",
|
|
192
|
+
"https://steamcommunity.com/market/search?q=chroma+case",
|
|
193
|
+
"https://steamcommunity.com/market/search?q=chroma+case",
|
|
194
|
+
"https://steamcommunity.com/market/search?q=clutch+case",
|
|
195
|
+
"https://steamcommunity.com/market/search?q=csgo+weapon+case",
|
|
196
|
+
"https://steamcommunity.com/market/search?q=csgo+weapon+case",
|
|
197
|
+
"https://steamcommunity.com/market/search?q=csgo+weapon+case",
|
|
198
|
+
"https://steamcommunity.com/market/search?q=cs20+case",
|
|
199
|
+
"https://steamcommunity.com/market/search?q=danger+zone+case",
|
|
200
|
+
"https://steamcommunity.com/market/search?q=esports+case",
|
|
201
|
+
"https://steamcommunity.com/market/search?q=esports+case",
|
|
202
|
+
"https://steamcommunity.com/market/search?q=esports+case",
|
|
203
|
+
"https://steamcommunity.com/market/search?q=falchion+case",
|
|
204
|
+
"https://steamcommunity.com/market/search?q=gamma+case",
|
|
205
|
+
"https://steamcommunity.com/market/search?q=gamma+case",
|
|
206
|
+
"https://steamcommunity.com/market/search?q=glove+case",
|
|
207
|
+
"https://steamcommunity.com/market/search?q=horizon+case",
|
|
208
|
+
"https://steamcommunity.com/market/search?q=huntsman+weapon+case",
|
|
209
|
+
"https://steamcommunity.com/market/search?q=operation+bravo+case",
|
|
210
|
+
"https://steamcommunity.com/market/search?q=operation+breakout+case",
|
|
211
|
+
"https://steamcommunity.com/market/search?q=operation+hydra+case",
|
|
212
|
+
"https://steamcommunity.com/market/search?q=operation+phoenix+case",
|
|
213
|
+
"https://steamcommunity.com/market/search?q=operation+vanguard+case",
|
|
214
|
+
"https://steamcommunity.com/market/search?q=operation+wildfire+case",
|
|
215
|
+
"https://steamcommunity.com/market/search?q=prisma+case",
|
|
216
|
+
"https://steamcommunity.com/market/search?q=prisma+case",
|
|
217
|
+
"https://steamcommunity.com/market/search?q=revolver+case",
|
|
218
|
+
"https://steamcommunity.com/market/search?q=shadow+case",
|
|
219
|
+
"https://steamcommunity.com/market/search?q=shattered+web+case",
|
|
220
|
+
"https://steamcommunity.com/market/search?q=spectrum+case",
|
|
221
|
+
"https://steamcommunity.com/market/search?q=spectrum+case",
|
|
222
|
+
"https://steamcommunity.com/market/search?q=winter+offensive+case",
|
|
223
|
+
"https://steamcommunity.com/market/search?q=kilowatt+case",
|
|
224
|
+
"https://steamcommunity.com/market/search?q=gallery+case",
|
|
225
|
+
"https://steamcommunity.com/market/search?q=fever+case",
|
|
226
|
+
]
|
|
227
|
+
|
|
228
|
+
CASE_HREFS = [
|
|
229
|
+
"https://steamcommunity.com/market/listings/730/Revolution%20Case",
|
|
230
|
+
"https://steamcommunity.com/market/listings/730/Recoil%20Case",
|
|
231
|
+
"https://steamcommunity.com/market/listings/730/Dreams%20%26%20Nightmares%20Case",
|
|
232
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Riptide%20Case",
|
|
233
|
+
"https://steamcommunity.com/market/listings/730/Snakebite%20Case",
|
|
234
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Broken%20Fang%20Case",
|
|
235
|
+
"https://steamcommunity.com/market/listings/730/Fracture%20Case",
|
|
236
|
+
"https://steamcommunity.com/market/listings/730/Chroma%20Case",
|
|
237
|
+
"https://steamcommunity.com/market/listings/730/Chroma%202%20Case",
|
|
238
|
+
"https://steamcommunity.com/market/listings/730/Chroma%203%20Case",
|
|
239
|
+
"https://steamcommunity.com/market/listings/730/Clutch%20Case",
|
|
240
|
+
"https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case",
|
|
241
|
+
"https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%202",
|
|
242
|
+
"https://steamcommunity.com/market/listings/730/CS%3AGO%20Weapon%20Case%203",
|
|
243
|
+
"https://steamcommunity.com/market/listings/730/CS20%20Case",
|
|
244
|
+
"https://steamcommunity.com/market/listings/730/Danger%20Zone%20Case",
|
|
245
|
+
"https://steamcommunity.com/market/listings/730/eSports%202013%20Case",
|
|
246
|
+
"https://steamcommunity.com/market/listings/730/eSports%202013%20Winter%20Case",
|
|
247
|
+
"https://steamcommunity.com/market/listings/730/eSports%202014%20Summer%20Case",
|
|
248
|
+
"https://steamcommunity.com/market/listings/730/Falchion%20Case",
|
|
249
|
+
"https://steamcommunity.com/market/listings/730/Gamma%20Case",
|
|
250
|
+
"https://steamcommunity.com/market/listings/730/Gamma%202%20Case",
|
|
251
|
+
"https://steamcommunity.com/market/listings/730/Glove%20Case",
|
|
252
|
+
"https://steamcommunity.com/market/listings/730/Horizon%20Case",
|
|
253
|
+
"https://steamcommunity.com/market/listings/730/Huntsman%20Weapon%20Case",
|
|
254
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Bravo%20Case",
|
|
255
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Breakout%20Weapon%20Case",
|
|
256
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Hydra%20Case",
|
|
257
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Phoenix%20Weapon%20Case",
|
|
258
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Vanguard%20Weapon%20Case",
|
|
259
|
+
"https://steamcommunity.com/market/listings/730/Operation%20Wildfire%20Case",
|
|
260
|
+
"https://steamcommunity.com/market/listings/730/Prisma%20Case",
|
|
261
|
+
"https://steamcommunity.com/market/listings/730/Prisma%202%20Case",
|
|
262
|
+
"https://steamcommunity.com/market/listings/730/Revolver%20Case",
|
|
263
|
+
"https://steamcommunity.com/market/listings/730/Shadow%20Case",
|
|
264
|
+
"https://steamcommunity.com/market/listings/730/Shattered%20Web%20Case",
|
|
265
|
+
"https://steamcommunity.com/market/listings/730/Spectrum%20Case",
|
|
266
|
+
"https://steamcommunity.com/market/listings/730/Spectrum%202%20Case",
|
|
267
|
+
"https://steamcommunity.com/market/listings/730/Winter%20Offensive%20Weapon%20Case",
|
|
268
|
+
"https://steamcommunity.com/market/listings/730/Kilowatt%20Case",
|
|
269
|
+
"https://steamcommunity.com/market/listings/730/Gallery%20Case",
|
|
270
|
+
"https://steamcommunity.com/market/listings/730/Fever%20Case",
|
|
271
|
+
]
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
[2020 RMR]
|
|
1
|
+
[2020 RMR Sticker Capsule]
|
|
2
2
|
RMR_Challengers = 0
|
|
3
3
|
RMR_Legends = 0
|
|
4
4
|
RMR_Contenders = 0
|
|
5
5
|
|
|
6
|
-
[Stockholm]
|
|
6
|
+
[Stockholm Sticker Capsule]
|
|
7
7
|
Stockholm_Challengers = 0
|
|
8
8
|
Stockholm_Legends = 0
|
|
9
9
|
Stockholm_Contenders = 0
|
|
10
10
|
Stockholm_Champions_Autographs = 0
|
|
11
11
|
Stockholm_Finalists_Autographs = 0
|
|
12
12
|
|
|
13
|
-
[Antwerp]
|
|
13
|
+
[Antwerp Sticker Capsule]
|
|
14
14
|
Antwerp_Challengers = 0
|
|
15
15
|
Antwerp_Legends = 0
|
|
16
16
|
Antwerp_Contenders = 0
|
|
@@ -19,7 +19,7 @@ Antwerp_Contenders_Autographs = 0
|
|
|
19
19
|
Antwerp_Challengers_Autographs = 0
|
|
20
20
|
Antwerp_Legends_Autographs = 0
|
|
21
21
|
|
|
22
|
-
[Rio]
|
|
22
|
+
[Rio Sticker Capsule]
|
|
23
23
|
Rio_Challengers = 0
|
|
24
24
|
Rio_Legends = 0
|
|
25
25
|
Rio_Contenders = 0
|
|
@@ -28,7 +28,7 @@ Rio_Contenders_Autographs = 0
|
|
|
28
28
|
Rio_Challengers_Autographs = 0
|
|
29
29
|
Rio_Legends_Autographs = 0
|
|
30
30
|
|
|
31
|
-
[Paris]
|
|
31
|
+
[Paris Sticker Capsule]
|
|
32
32
|
Paris_Challengers = 0
|
|
33
33
|
Paris_Legends = 0
|
|
34
34
|
Paris_Contenders = 0
|
|
@@ -37,7 +37,7 @@ Paris_Contenders_Autographs = 0
|
|
|
37
37
|
Paris_Challengers_Autographs = 0
|
|
38
38
|
Paris_Legends_Autographs = 0
|
|
39
39
|
|
|
40
|
-
[Copenhagen]
|
|
40
|
+
[Copenhagen Sticker Capsule]
|
|
41
41
|
Copenhagen_Challengers = 0
|
|
42
42
|
Copenhagen_Legends = 0
|
|
43
43
|
Copenhagen_Contenders = 0
|
|
@@ -46,7 +46,7 @@ Copenhagen_Contenders_Autographs = 0
|
|
|
46
46
|
Copenhagen_Challengers_Autographs = 0
|
|
47
47
|
Copenhagen_Legends_Autographs = 0
|
|
48
48
|
|
|
49
|
-
[Shanghai]
|
|
49
|
+
[Shanghai Sticker Capsule]
|
|
50
50
|
Shanghai_Challengers = 0
|
|
51
51
|
Shanghai_Legends = 0
|
|
52
52
|
Shanghai_Contenders = 0
|
|
@@ -55,7 +55,7 @@ Shanghai_Contenders_Autographs = 0
|
|
|
55
55
|
Shanghai_Challengers_Autographs = 0
|
|
56
56
|
Shanghai_Legends_Autographs = 0
|
|
57
57
|
|
|
58
|
-
[Austin]
|
|
58
|
+
[Austin Sticker Capsule]
|
|
59
59
|
Austin_Challengers = 0
|
|
60
60
|
Austin_Legends = 0
|
|
61
61
|
Austin_Contenders = 0
|
|
@@ -108,6 +108,6 @@ Kilowatt_Case = 0
|
|
|
108
108
|
Gallery_Case = 0
|
|
109
109
|
Fever_Case = 0
|
|
110
110
|
|
|
111
|
-
[
|
|
111
|
+
[Settings]
|
|
112
112
|
Use_Proxy = False
|
|
113
113
|
API_Key = None
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
import urllib3
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
|
|
6
|
+
from cs2tracker._version import version # pylint: disable=E0611
|
|
7
|
+
from cs2tracker.application import Application
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main():
|
|
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
|
|
19
|
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
20
|
+
|
|
21
|
+
console = Console()
|
|
22
|
+
console.print(
|
|
23
|
+
"[bold yellow]"
|
|
24
|
+
+ """
|
|
25
|
+
__ _____ _____ ______ ____ ____ __ __ _ ___ ____
|
|
26
|
+
/ ] / ___/| T| T| \\ / T / ]| l/ ] / _]| \\
|
|
27
|
+
/ / ( \\_ l__/ || || D )Y o | / / | ' / / [_ | D )
|
|
28
|
+
/ / \\__ T| __jl_j l_j| / | | / / | \\ Y _]| /
|
|
29
|
+
/ \\_ / \\ || / | | | | \\ | _ |/ \\_ | Y| [_ | \\
|
|
30
|
+
\\ | \\ || | | | | . Y| | |\\ || . || T| . Y
|
|
31
|
+
\\____j \\___jl_____j l__j l__j\\_jl__j__j \\____jl__j\\_jl_____jl__j\\_j
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
"""
|
|
35
|
+
+ f"Version: v{version} - {datetime.today().strftime('%Y/%m/%d')} - Jannik Novak @ashiven\n"
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
application = Application()
|
|
39
|
+
application.run()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
if __name__ == "__main__":
|
|
43
|
+
main()
|