hh-applicant-tool 0.6.2__tar.gz → 0.6.3__tar.gz
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-0.6.2 → hh_applicant_tool-0.6.3}/PKG-INFO +1 -1
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/reply_employers.py +33 -4
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/pyproject.toml +1 -1
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/README.md +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/__init__.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/__main__.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/ai/__init__.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/ai/blackbox.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/api/__init__.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/api/client.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/api/errors.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/color_log.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/constants.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/jsonc.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/main.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/mixins.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/__init__.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/apply_similar.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/authorize.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/call_api.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/clear_negotiations.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/config.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/delete_telemetry.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/get_employer_contacts.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/list_resumes.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/refresh_token.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/update_resumes.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/whoami.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/telemetry_client.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/types.py +0 -0
- {hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/utils.py +0 -0
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/reply_employers.py
RENAMED
|
@@ -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,18 @@ 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
|
+
for page in count(0):
|
|
108
|
+
r = self.api_client.get("/employers/blacklisted", page=page)
|
|
109
|
+
rv += [item["id"] for item in r["items"]]
|
|
110
|
+
if page >= r["pages"]:
|
|
111
|
+
break
|
|
112
|
+
return rv
|
|
113
|
+
|
|
103
114
|
def _reply_chats(self) -> None:
|
|
115
|
+
blacklisted = self._get_blacklisted()
|
|
116
|
+
logger.debug(f"{blacklisted = }")
|
|
104
117
|
me = self.me = self.api_client.get("/me")
|
|
105
118
|
|
|
106
119
|
telemetry_data = {"links": []}
|
|
@@ -130,11 +143,19 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
130
143
|
logger.debug(negotiation)
|
|
131
144
|
nid = negotiation["id"]
|
|
132
145
|
vacancy = negotiation["vacancy"]
|
|
146
|
+
employer = vacancy.get("employer") or {}
|
|
133
147
|
salary = vacancy.get("salary") or {}
|
|
134
148
|
|
|
149
|
+
if employer.get("id") in blacklisted:
|
|
150
|
+
print(
|
|
151
|
+
"🚫 Пропускаем заблокированного работодателя",
|
|
152
|
+
employer.get("alternate_url"),
|
|
153
|
+
)
|
|
154
|
+
continue
|
|
155
|
+
|
|
135
156
|
message_placeholders = {
|
|
136
157
|
"vacancy_name": vacancy.get("name", ""),
|
|
137
|
-
"employer_name":
|
|
158
|
+
"employer_name": employer.get("name", ""),
|
|
138
159
|
**basic_message_placeholders,
|
|
139
160
|
}
|
|
140
161
|
|
|
@@ -229,8 +250,9 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
229
250
|
print("-" * 10)
|
|
230
251
|
print()
|
|
231
252
|
print(
|
|
232
|
-
"
|
|
253
|
+
"Отмена отклика: /cancel <необязательное сообщение для отказа>"
|
|
233
254
|
)
|
|
255
|
+
print("Заблокировать работодателя: /ban")
|
|
234
256
|
print()
|
|
235
257
|
send_message = input("Ваше сообщение: ").strip()
|
|
236
258
|
except EOFError:
|
|
@@ -254,13 +276,20 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
254
276
|
)
|
|
255
277
|
)
|
|
256
278
|
|
|
257
|
-
if send_message.startswith("/
|
|
279
|
+
if send_message.startswith("/ban"):
|
|
280
|
+
self.api_client.put(f"/employers/blacklisted/{employer['id']}")
|
|
281
|
+
blacklisted.append(employer["id"])
|
|
282
|
+
print(
|
|
283
|
+
"🚫 Работодатель добавлен в черный список",
|
|
284
|
+
employer.get("alternate_url"),
|
|
285
|
+
)
|
|
286
|
+
elif send_message.startswith("/cancel"):
|
|
258
287
|
_, decline_allowed = send_message.split("/cancel", 1)
|
|
259
288
|
self.api_client.delete(
|
|
260
289
|
f"/negotiations/active/{negotiation['id']}",
|
|
261
290
|
with_decline_message=decline_allowed.strip(),
|
|
262
291
|
)
|
|
263
|
-
print("Отменили заявку", vacancy["alternate_url"])
|
|
292
|
+
print("❌ Отменили заявку", vacancy["alternate_url"])
|
|
264
293
|
else:
|
|
265
294
|
self.api_client.post(
|
|
266
295
|
f"/negotiations/{nid}/messages",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/__init__.py
RENAMED
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/apply_similar.py
RENAMED
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/authorize.py
RENAMED
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/call_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/delete_telemetry.py
RENAMED
|
File without changes
|
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/list_resumes.py
RENAMED
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/refresh_token.py
RENAMED
|
File without changes
|
{hh_applicant_tool-0.6.2 → hh_applicant_tool-0.6.3}/hh_applicant_tool/operations/update_resumes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|