Skip to content

Commit ff76fea

Browse files
authored
Merge pull request #21 from offish/v2.3.4
v2.3.4
2 parents b4ac2ac + 7d5e475 commit ff76fea

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/tf2_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__title__ = "tf2-utils"
22
__author__ = "offish"
3-
__version__ = "2.3.3"
3+
__version__ = "2.3.4"
44
__license__ = "MIT"
55

66
from .currency import CurrencyExchange

src/tf2_utils/prices_tf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,16 @@ def get_prices_till_page(
9595
timeout = 60
9696

9797
if print_rate_limit:
98-
print(f"rate limited from prices.tf, waiting {timeout} seconds")
98+
print(f"We are rate limited, waiting {timeout} seconds...")
9999

100100
time.sleep(timeout)
101101
continue
102+
except UnauthorizedError:
103+
if print_rate_limit:
104+
print("We are unauthorized, requesting new access token...")
105+
106+
self.request_access_token()
107+
continue
102108

103109
if "items" not in response:
104110
raise PricesTFError("could not find any items in response")

src/tf2_utils/schema.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ def name_to_defindex(self, name: str, index: int = 0) -> int:
7070
if name == "Name Tag":
7171
return defindexes[last_index]
7272

73-
print(index)
74-
print(defindexes)
7573
return defindexes[index]
7674

7775
def defindex_to_image_url(self, defindex: int, large_image: bool = False) -> str:

0 commit comments

Comments
 (0)