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

Commit c11e3fc

Browse files
authored
Update _bot_functions.py
1 parent 2e82fa8 commit c11e3fc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Help_functions/_bot_functions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ def _fix_product_name(product):
2828
else:
2929
return Q, item
3030

31+
def _get_staff_list(URL):
32+
blacklist = set()
33+
i = requests.get(f"{URL}staff.html")
34+
tree = fromstring(i.content)
35+
nicks = tree.xpath('//*[@id="esim-layout"]//a/text()')
36+
for nick in nicks:
37+
blacklist.add(nick.strip())
38+
return blacklist
39+
3140
def _get_battle_id(server, battle_id, session):
3241
URL = f"https://{server}.e-sim.org/"
3342
nick = get_nick_and_pw(server)[0]

0 commit comments

Comments
 (0)