Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 4d71fe7

Browse files
Update buy_product.py
1 parent ef61445 commit 4d71fe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Basic/buy_product.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def products(server, product, amount, session=""):
4242
tree = fromstring(monetaryMarket.content)
4343
ID = tree.xpath("//tr[2]//td[4]//form[1]//input[@value][2]")[0].value
4444
CC_offer = float(tree.xpath('//tr[2]//td[2]//b')[0].text)
45-
cc_quantity = CC_offer if CC_offer < (int(amount) - productsBought) * cost else (int
46-
amount) - productsBought) * cost
45+
cc_quantity = CC_offer if CC_offer < (int(amount) - productsBought) * cost else \
46+
(int(amount) - productsBought) * cost
4747
# Todo: No gold case
4848
payload = {'action': "buy", 'id': ID, 'ammount': cc_quantity}
4949
buy_cc = session.post(URL + "monetaryMarket.html", data=payload)

0 commit comments

Comments
 (0)