Skip to content

Commit

Permalink
v0.1.14.10 - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sidor0912 committed Nov 23, 2024
1 parent db72021 commit ddb759d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions FunPayAPI/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -1293,16 +1293,19 @@ def get_sales(self, start_from: str | None = None, include_paid: bool = True, in
sudcategories = dict()
app_data = json.loads(parser.find("body").get("data-app-data"))
locale = app_data.get("locale")
games_options = parser.find("select", attrs={"name": "game"}).find_all(
lambda x: x.name == "option" and x.get("value"))
for game_option in games_options:
game_name = game_option.text
sections_list = json.loads(game_option.get("data-data"))
for key, section_name in sections_list:
section_type, section_id = key.split("-")
section_type = types.SubCategoryTypes.COMMON if section_type == "lot" else types.SubCategoryTypes.CURRENCY
section_id = int(section_id)
sudcategories[f"{game_name}, {section_name}"] = self.get_subcategory(section_type, section_id)
games_options = parser.find("select", attrs={"name": "game"})
if games_options:
games_options = games_options.find_all(lambda x: x.name == "option" and x.get("value"))
for game_option in games_options:
game_name = game_option.text
sections_list = json.loads(game_option.get("data-data"))
for key, section_name in sections_list:
section_type, section_id = key.split("-")
section_type = types.SubCategoryTypes.COMMON if section_type == "lot" else types.SubCategoryTypes.CURRENCY
section_id = int(section_id)
sudcategories[f"{game_name}, {section_name}"] = self.get_subcategory(section_type, section_id)
else:
sudcategories = None
if not order_divs:
return None, [], locale, sudcategories

Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
......................','.",`............ ..................
............................................................"""

VERSION = "0.1.14.9"
VERSION = "0.1.14.10"

Utils.cardinal_tools.set_console_title(f"FunPay Cardinal v{VERSION}")

Expand Down

0 comments on commit ddb759d

Please sign in to comment.