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

Commit 95fb71d

Browse files
authored
Update motivates.py
1 parent 36ad5a2 commit 95fb71d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Fight/motivates.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
if __name__ == "__main__":
2-
from supply import supply
3-
else:
4-
from .supply import supply
5-
1+
from supply import supply
62
from login import login
3+
74
from lxml.html import fromstring
85

96
def send_motivates(server, Type="all", session=""):
@@ -74,9 +71,10 @@ def send_motivates(server, Type="all", session=""):
7471
birthday = int(
7572
tree.xpath("//*[@id='profileTable']//tr//td[1]//div[3]//div[9]//span[1]/text()")[0].split()[1])
7673
if today - birthday > 3:
77-
break # checked all new players
74+
print("Checked all new players")
75+
break
7876
if tree.xpath('//*[@id="motivateCitizenButton"]'):
79-
for num in range(1, 4): # all 3 types
77+
for num in storage:
8078
payload = {'type': num, "submit": "Motivate", "id": citizenId}
8179
send = session.post(f"{URL}motivateCitizen.html?id={citizenId}", data=payload)
8280
print(send.url)

0 commit comments

Comments
 (0)