cs2tracker 2.1.3__py3-none-any.whl → 2.1.4__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.
- cs2tracker/_version.py +2 -2
- cs2tracker/scraper.py +13 -8
- {cs2tracker-2.1.3.dist-info → cs2tracker-2.1.4.dist-info}/METADATA +1 -1
- {cs2tracker-2.1.3.dist-info → cs2tracker-2.1.4.dist-info}/RECORD +8 -8
- {cs2tracker-2.1.3.dist-info → cs2tracker-2.1.4.dist-info}/WHEEL +0 -0
- {cs2tracker-2.1.3.dist-info → cs2tracker-2.1.4.dist-info}/entry_points.txt +0 -0
- {cs2tracker-2.1.3.dist-info → cs2tracker-2.1.4.dist-info}/licenses/LICENSE.md +0 -0
- {cs2tracker-2.1.3.dist-info → cs2tracker-2.1.4.dist-info}/top_level.txt +0 -0
cs2tracker/_version.py
CHANGED
cs2tracker/scraper.py
CHANGED
|
@@ -28,8 +28,13 @@ from cs2tracker.constants import (
|
|
|
28
28
|
MAX_LINE_LEN = 72
|
|
29
29
|
SEPARATOR = "-"
|
|
30
30
|
PRICE_INFO = "Owned: {} Steam market price: ${} Total: ${}\n"
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
|
|
32
|
+
WIN_BACKGROUND_TASK_NAME = "CS2Tracker Daily Calculation"
|
|
33
|
+
WIN_BACKGROUND_TASK_SCHEDULE = "DAILY"
|
|
34
|
+
WIN_BACKGROUND_TASK_TIME = "12:00"
|
|
35
|
+
WIN_BACKGROUND_TASK_CMD = (
|
|
36
|
+
f"powershell -WindowStyle Hidden -Command \"Start-Process '{BATCH_FILE}' -WindowStyle Hidden\""
|
|
37
|
+
)
|
|
33
38
|
|
|
34
39
|
|
|
35
40
|
class Scraper:
|
|
@@ -311,7 +316,7 @@ class Scraper:
|
|
|
311
316
|
:return: True if a background task is found, False otherwise.
|
|
312
317
|
"""
|
|
313
318
|
if sys.platform.startswith("win"):
|
|
314
|
-
cmd = ["schtasks", "/query", "/tn",
|
|
319
|
+
cmd = ["schtasks", "/query", "/tn", WIN_BACKGROUND_TASK_NAME]
|
|
315
320
|
return_code = call(cmd, stdout=DEVNULL, stderr=DEVNULL)
|
|
316
321
|
found = return_code == 0
|
|
317
322
|
return found
|
|
@@ -347,13 +352,13 @@ class Scraper:
|
|
|
347
352
|
"schtasks",
|
|
348
353
|
"/create",
|
|
349
354
|
"/tn",
|
|
350
|
-
|
|
355
|
+
WIN_BACKGROUND_TASK_NAME,
|
|
351
356
|
"/tr",
|
|
352
|
-
|
|
357
|
+
WIN_BACKGROUND_TASK_CMD,
|
|
353
358
|
"/sc",
|
|
354
|
-
|
|
359
|
+
WIN_BACKGROUND_TASK_SCHEDULE,
|
|
355
360
|
"/st",
|
|
356
|
-
|
|
361
|
+
WIN_BACKGROUND_TASK_TIME,
|
|
357
362
|
]
|
|
358
363
|
return_code = call(cmd, stdout=DEVNULL, stderr=DEVNULL)
|
|
359
364
|
if return_code == 0:
|
|
@@ -361,7 +366,7 @@ class Scraper:
|
|
|
361
366
|
else:
|
|
362
367
|
self.console.print("[bold red][!] Failed to enable background task.")
|
|
363
368
|
else:
|
|
364
|
-
cmd = ["schtasks", "/delete", "/tn",
|
|
369
|
+
cmd = ["schtasks", "/delete", "/tn", WIN_BACKGROUND_TASK_NAME, "/f"]
|
|
365
370
|
return_code = call(cmd, stdout=DEVNULL, stderr=DEVNULL)
|
|
366
371
|
if return_code == 0:
|
|
367
372
|
self.console.print("[bold green][-] Background task disabled.")
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
cs2tracker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
cs2tracker/__main__.py,sha256=Ub--oSMv48YzfWF1CZqYlkn1-HvZ7Bhxoc7urn1oY6o,249
|
|
3
|
-
cs2tracker/_version.py,sha256=
|
|
3
|
+
cs2tracker/_version.py,sha256=cuCBChX_WW6rxX7DfFGzi-EJBf76bHcqGsjRlHgeMvg,511
|
|
4
4
|
cs2tracker/application.py,sha256=CYuvEV2PlAKQ0MD_9vLViTonzspQFWJBGN6rzAOpAQY,4212
|
|
5
5
|
cs2tracker/constants.py,sha256=VG4QBedqHT9kjehWU-Uop7MNlD1VuERgL_VA4oN3obc,15127
|
|
6
6
|
cs2tracker/main.py,sha256=YmWXza0lmDDvLbOWzkJ6n0B1c-tq7Ub-IpwXSeIoKuQ,1309
|
|
7
|
-
cs2tracker/scraper.py,sha256=
|
|
7
|
+
cs2tracker/scraper.py,sha256=XoRtTPwN2Lxzqqghvcp3TOe9VdRge7Y_JTGOOJJyd3g,15457
|
|
8
8
|
cs2tracker/data/config.ini,sha256=LbdwEMFlgD8ubuEvGhYZdPtYsWhlho3nX3SLWi4T7Kg,2637
|
|
9
|
-
cs2tracker-2.1.
|
|
10
|
-
cs2tracker-2.1.
|
|
11
|
-
cs2tracker-2.1.
|
|
12
|
-
cs2tracker-2.1.
|
|
13
|
-
cs2tracker-2.1.
|
|
14
|
-
cs2tracker-2.1.
|
|
9
|
+
cs2tracker-2.1.4.dist-info/licenses/LICENSE.md,sha256=G5wqQ_8KGA808kVuF-Fpu_Yhteg8K_5ux9n2v8eQK7s,1069
|
|
10
|
+
cs2tracker-2.1.4.dist-info/METADATA,sha256=CfTvVmloYwmxtvnu0UUeOY6CzO7W3gsBNjGdMFxkBbk,2954
|
|
11
|
+
cs2tracker-2.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
cs2tracker-2.1.4.dist-info/entry_points.txt,sha256=K8IwDIkg8QztSB9g9c89B9jR_2pG4QyJGrNs4z5RcZw,63
|
|
13
|
+
cs2tracker-2.1.4.dist-info/top_level.txt,sha256=2HB4xDDOxaU5BDc_yvdi9UlYLgL768n8aR-hRhFM6VQ,11
|
|
14
|
+
cs2tracker-2.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|