hh-applicant-tool 0.6.2__py3-none-any.whl → 0.6.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hh-applicant-tool might be problematic. Click here for more details.
- hh_applicant_tool/operations/apply_similar.py +2 -5
- hh_applicant_tool/operations/reply_employers.py +34 -4
- {hh_applicant_tool-0.6.2.dist-info → hh_applicant_tool-0.6.4.dist-info}/METADATA +1 -1
- {hh_applicant_tool-0.6.2.dist-info → hh_applicant_tool-0.6.4.dist-info}/RECORD +6 -6
- {hh_applicant_tool-0.6.2.dist-info → hh_applicant_tool-0.6.4.dist-info}/WHEEL +0 -0
- {hh_applicant_tool-0.6.2.dist-info → hh_applicant_tool-0.6.4.dist-info}/entry_points.txt +0 -0
|
@@ -266,11 +266,8 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
266
266
|
telemetry_data["employers"][employer_id] = employer_data
|
|
267
267
|
|
|
268
268
|
if not do_apply:
|
|
269
|
-
logger.debug(
|
|
270
|
-
|
|
271
|
-
vacancy["alternate_url"],
|
|
272
|
-
)
|
|
273
|
-
continue
|
|
269
|
+
logger.debug("Останавливаем рассылку откликов, так как достигли лимита, попробуйте через сутки.")
|
|
270
|
+
break
|
|
274
271
|
|
|
275
272
|
if relations:
|
|
276
273
|
logger.debug(
|
|
@@ -13,11 +13,13 @@ from ..mixins import GetResumeIdMixin
|
|
|
13
13
|
from ..utils import parse_interval, random_text
|
|
14
14
|
from ..telemetry_client import TelemetryClient, TelemetryError
|
|
15
15
|
import re
|
|
16
|
+
from itertools import count
|
|
16
17
|
|
|
17
18
|
try:
|
|
18
19
|
import readline
|
|
19
20
|
|
|
20
21
|
readline.add_history("/cancel ")
|
|
22
|
+
readline.add_history("/ban")
|
|
21
23
|
readline.set_history_length(10_000)
|
|
22
24
|
except ImportError:
|
|
23
25
|
pass
|
|
@@ -100,7 +102,19 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
100
102
|
logger.debug(f"{self.reply_message = }")
|
|
101
103
|
self._reply_chats()
|
|
102
104
|
|
|
105
|
+
def _get_blacklisted(self) -> list[str]:
|
|
106
|
+
rv = []
|
|
107
|
+
# В этом методе API страницы с 0 начинаются
|
|
108
|
+
for page in count(0):
|
|
109
|
+
r = self.api_client.get("/employers/blacklisted", page=page)
|
|
110
|
+
rv += [item["id"] for item in r["items"]]
|
|
111
|
+
if page + 1 >= r["pages"]:
|
|
112
|
+
break
|
|
113
|
+
return rv
|
|
114
|
+
|
|
103
115
|
def _reply_chats(self) -> None:
|
|
116
|
+
blacklisted = self._get_blacklisted()
|
|
117
|
+
logger.debug(f"{blacklisted = }")
|
|
104
118
|
me = self.me = self.api_client.get("/me")
|
|
105
119
|
|
|
106
120
|
telemetry_data = {"links": []}
|
|
@@ -130,11 +144,19 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
130
144
|
logger.debug(negotiation)
|
|
131
145
|
nid = negotiation["id"]
|
|
132
146
|
vacancy = negotiation["vacancy"]
|
|
147
|
+
employer = vacancy.get("employer") or {}
|
|
133
148
|
salary = vacancy.get("salary") or {}
|
|
134
149
|
|
|
150
|
+
if employer.get("id") in blacklisted:
|
|
151
|
+
print(
|
|
152
|
+
"🚫 Пропускаем заблокированного работодателя",
|
|
153
|
+
employer.get("alternate_url"),
|
|
154
|
+
)
|
|
155
|
+
continue
|
|
156
|
+
|
|
135
157
|
message_placeholders = {
|
|
136
158
|
"vacancy_name": vacancy.get("name", ""),
|
|
137
|
-
"employer_name":
|
|
159
|
+
"employer_name": employer.get("name", ""),
|
|
138
160
|
**basic_message_placeholders,
|
|
139
161
|
}
|
|
140
162
|
|
|
@@ -229,8 +251,9 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
229
251
|
print("-" * 10)
|
|
230
252
|
print()
|
|
231
253
|
print(
|
|
232
|
-
"
|
|
254
|
+
"Отмена отклика: /cancel <необязательное сообщение для отказа>"
|
|
233
255
|
)
|
|
256
|
+
print("Заблокировать работодателя: /ban")
|
|
234
257
|
print()
|
|
235
258
|
send_message = input("Ваше сообщение: ").strip()
|
|
236
259
|
except EOFError:
|
|
@@ -254,13 +277,20 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
254
277
|
)
|
|
255
278
|
)
|
|
256
279
|
|
|
257
|
-
if send_message.startswith("/
|
|
280
|
+
if send_message.startswith("/ban"):
|
|
281
|
+
self.api_client.put(f"/employers/blacklisted/{employer['id']}")
|
|
282
|
+
blacklisted.append(employer["id"])
|
|
283
|
+
print(
|
|
284
|
+
"🚫 Работодатель добавлен в черный список",
|
|
285
|
+
employer.get("alternate_url"),
|
|
286
|
+
)
|
|
287
|
+
elif send_message.startswith("/cancel"):
|
|
258
288
|
_, decline_allowed = send_message.split("/cancel", 1)
|
|
259
289
|
self.api_client.delete(
|
|
260
290
|
f"/negotiations/active/{negotiation['id']}",
|
|
261
291
|
with_decline_message=decline_allowed.strip(),
|
|
262
292
|
)
|
|
263
|
-
print("Отменили заявку", vacancy["alternate_url"])
|
|
293
|
+
print("❌ Отменили заявку", vacancy["alternate_url"])
|
|
264
294
|
else:
|
|
265
295
|
self.api_client.post(
|
|
266
296
|
f"/negotiations/{nid}/messages",
|
|
@@ -11,7 +11,7 @@ hh_applicant_tool/jsonc.py,sha256=QNS4gRHfi7SAeOFnffAIuhH7auC4Y4HAkmH12eX5PkI,40
|
|
|
11
11
|
hh_applicant_tool/main.py,sha256=A4YPkNXAdZY0GoGm0iigiQtzXTrpR3SaIGo54q9-Dd0,5652
|
|
12
12
|
hh_applicant_tool/mixins.py,sha256=8VoyrNgdlljy6pLTSFGJOYd9kagWT3yFOZYIGR6MEbI,425
|
|
13
13
|
hh_applicant_tool/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
hh_applicant_tool/operations/apply_similar.py,sha256=
|
|
14
|
+
hh_applicant_tool/operations/apply_similar.py,sha256=tsfEP0fFWCLYdTqHBXXTPjNYE7yQMPIL3jMkQ4P-e-c,15520
|
|
15
15
|
hh_applicant_tool/operations/authorize.py,sha256=NYrxe6oemUBcDHioT1t1lJmi9l45V4ZXzQPD_-nf6hk,3328
|
|
16
16
|
hh_applicant_tool/operations/call_api.py,sha256=o3GZgtqk6w4zpCm-JTHVjFrKVOwW-vsu1HdRi-hqAjo,1423
|
|
17
17
|
hh_applicant_tool/operations/clear_negotiations.py,sha256=mu9nBdP7b_dlEMQk88w0IWX1lNTTFqnWbS1tCO1Mlws,4329
|
|
@@ -20,13 +20,13 @@ hh_applicant_tool/operations/delete_telemetry.py,sha256=JHdh_l7IJL_qy5AIIy8FQpUu
|
|
|
20
20
|
hh_applicant_tool/operations/get_employer_contacts.py,sha256=Sd-x3O08bmKm1OGVLtJ6rcPZ_j1jwjlqKV4z1n_G-38,9918
|
|
21
21
|
hh_applicant_tool/operations/list_resumes.py,sha256=dILHyBCSEVqdNAvD8SML5f2Lau1R2AzTaKE9B4FG8Wg,1109
|
|
22
22
|
hh_applicant_tool/operations/refresh_token.py,sha256=v_Fcw9mCfOdE6MLTCQjZQudhJPX0fup3k0BaIM394Qw,834
|
|
23
|
-
hh_applicant_tool/operations/reply_employers.py,sha256=
|
|
23
|
+
hh_applicant_tool/operations/reply_employers.py,sha256=uxLN2YpZvz3m_KtnfaaJcfVEZkO-h9RMRndFmiqhLQw,13512
|
|
24
24
|
hh_applicant_tool/operations/update_resumes.py,sha256=_r7HA_vpYMs5DFY-mVP1ZRG9bggsv7ebKYrwteBmJ30,1053
|
|
25
25
|
hh_applicant_tool/operations/whoami.py,sha256=pNWJMmEQLBk3U6eiGz4CHcX7eXzDXcfezFjX7zLjqyA,711
|
|
26
26
|
hh_applicant_tool/telemetry_client.py,sha256=1EKZWc5kMx2yERW9SrR9vaf-OB6M_KKcMXeicH5YyY0,3834
|
|
27
27
|
hh_applicant_tool/types.py,sha256=q3yaIcq-UOkPzjxws0OFa4w9fTty-yx79_dic70_dUM,843
|
|
28
28
|
hh_applicant_tool/utils.py,sha256=3T4A2AykGqTwtGAttmYplIjHwFl3pNAcbWIVuA-OheQ,3080
|
|
29
|
-
hh_applicant_tool-0.6.
|
|
30
|
-
hh_applicant_tool-0.6.
|
|
31
|
-
hh_applicant_tool-0.6.
|
|
32
|
-
hh_applicant_tool-0.6.
|
|
29
|
+
hh_applicant_tool-0.6.4.dist-info/METADATA,sha256=lQ4B6Q6usO_QsEj7_7BIz_lSk2SwXsBrIMGiuix5bO8,20600
|
|
30
|
+
hh_applicant_tool-0.6.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
31
|
+
hh_applicant_tool-0.6.4.dist-info/entry_points.txt,sha256=Vb7M2YaYLMtKYJZh8chIrXZApMzSRFT1-rQw-U9r10g,65
|
|
32
|
+
hh_applicant_tool-0.6.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|