hh-applicant-tool 0.6.9__py3-none-any.whl → 0.6.10__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 +61 -21
- {hh_applicant_tool-0.6.9.dist-info → hh_applicant_tool-0.6.10.dist-info}/METADATA +1 -1
- {hh_applicant_tool-0.6.9.dist-info → hh_applicant_tool-0.6.10.dist-info}/RECORD +5 -5
- {hh_applicant_tool-0.6.9.dist-info → hh_applicant_tool-0.6.10.dist-info}/WHEEL +0 -0
- {hh_applicant_tool-0.6.9.dist-info → hh_applicant_tool-0.6.10.dist-info}/entry_points.txt +0 -0
|
@@ -4,11 +4,11 @@ import random
|
|
|
4
4
|
import time
|
|
5
5
|
from collections import defaultdict
|
|
6
6
|
from datetime import datetime, timedelta, timezone
|
|
7
|
-
from typing import TextIO
|
|
7
|
+
from typing import Any, TextIO
|
|
8
8
|
|
|
9
|
-
from ..api.errors import LimitExceeded
|
|
10
9
|
from ..ai.blackbox import BlackboxChat, BlackboxError
|
|
11
|
-
from ..api import
|
|
10
|
+
from ..api import ApiClient, ApiError
|
|
11
|
+
from ..api.errors import LimitExceeded
|
|
12
12
|
from ..main import BaseOperation
|
|
13
13
|
from ..main import Namespace as BaseNamespace
|
|
14
14
|
from ..mixins import GetResumeIdMixin
|
|
@@ -63,12 +63,15 @@ class Namespace(BaseNamespace):
|
|
|
63
63
|
premium: bool
|
|
64
64
|
responses_count_enabled: bool
|
|
65
65
|
|
|
66
|
+
|
|
66
67
|
def _bool(v: bool) -> str:
|
|
67
68
|
return str(v).lower()
|
|
68
69
|
|
|
70
|
+
|
|
69
71
|
def _join_list(items: list[Any] | None) -> str:
|
|
70
72
|
return ",".join(f"{v}" for v in items) if items else ""
|
|
71
73
|
|
|
74
|
+
|
|
72
75
|
class Operation(BaseOperation, GetResumeIdMixin):
|
|
73
76
|
"""Откликнуться на все подходящие вакансии.
|
|
74
77
|
|
|
@@ -153,16 +156,22 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
153
156
|
type=str,
|
|
154
157
|
default=None,
|
|
155
158
|
)
|
|
156
|
-
parser.add_argument(
|
|
159
|
+
parser.add_argument(
|
|
160
|
+
"--employment", nargs="+", help="Тип занятости (employment)"
|
|
161
|
+
)
|
|
157
162
|
parser.add_argument("--area", nargs="+", help="Регион (area id)")
|
|
158
163
|
parser.add_argument("--metro", nargs="+", help="Станции метро (metro id)")
|
|
159
164
|
parser.add_argument("--professional-role", nargs="+", help="Проф. роль (id)")
|
|
160
165
|
parser.add_argument("--industry", nargs="+", help="Индустрия (industry id)")
|
|
161
166
|
parser.add_argument("--employer-id", nargs="+", help="ID работодателей")
|
|
162
|
-
parser.add_argument(
|
|
167
|
+
parser.add_argument(
|
|
168
|
+
"--excluded-employer-id", nargs="+", help="Исключить работодателей"
|
|
169
|
+
)
|
|
163
170
|
parser.add_argument("--currency", help="Код валюты (RUR, USD, EUR)")
|
|
164
171
|
parser.add_argument("--salary", type=int, help="Минимальная зарплата")
|
|
165
|
-
parser.add_argument(
|
|
172
|
+
parser.add_argument(
|
|
173
|
+
"--only-with-salary", default=False, action=argparse.BooleanOptionalAction
|
|
174
|
+
)
|
|
166
175
|
parser.add_argument("--label", nargs="+", help="Метки вакансий (label)")
|
|
167
176
|
parser.add_argument("--period", type=int, help="Искать вакансии за N дней")
|
|
168
177
|
parser.add_argument("--date-from", help="Дата публикации с (YYYY-MM-DD)")
|
|
@@ -171,14 +180,43 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
171
180
|
parser.add_argument("--bottom-lat", type=float, help="Гео: нижняя широта")
|
|
172
181
|
parser.add_argument("--left-lng", type=float, help="Гео: левая долгота")
|
|
173
182
|
parser.add_argument("--right-lng", type=float, help="Гео: правая долгота")
|
|
174
|
-
parser.add_argument(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
parser.add_argument(
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
parser.add_argument(
|
|
184
|
+
"--sort-point-lat",
|
|
185
|
+
type=float,
|
|
186
|
+
help="Координата lat для сортировки по расстоянию",
|
|
187
|
+
)
|
|
188
|
+
parser.add_argument(
|
|
189
|
+
"--sort-point-lng",
|
|
190
|
+
type=float,
|
|
191
|
+
help="Координата lng для сортировки по расстоянию",
|
|
192
|
+
)
|
|
193
|
+
parser.add_argument(
|
|
194
|
+
"--no-magic",
|
|
195
|
+
default=False,
|
|
196
|
+
action=argparse.BooleanOptionalAction,
|
|
197
|
+
help="Отключить авторазбор текста запроса",
|
|
198
|
+
)
|
|
199
|
+
parser.add_argument(
|
|
200
|
+
"--premium",
|
|
201
|
+
default=False,
|
|
202
|
+
action=argparse.BooleanOptionalAction,
|
|
203
|
+
help="Только премиум вакансии",
|
|
204
|
+
)
|
|
205
|
+
parser.add_argument(
|
|
206
|
+
"--responses-count-enabled",
|
|
207
|
+
default=False,
|
|
208
|
+
action=argparse.BooleanOptionalAction,
|
|
209
|
+
help="Включить счётчик откликов",
|
|
210
|
+
)
|
|
211
|
+
parser.add_argument(
|
|
212
|
+
"--search-field", nargs="+", help="Поля поиска (name, company_name и т.п.)"
|
|
213
|
+
)
|
|
214
|
+
parser.add_argument(
|
|
215
|
+
"--clusters",
|
|
216
|
+
action=argparse.BooleanOptionalAction,
|
|
217
|
+
help="Включить кластеры (по умолчанию None)",
|
|
218
|
+
)
|
|
219
|
+
# parser.add_argument("--describe-arguments", action=argparse.BooleanOptionalAction, help="Вернуть описание параметров запроса")
|
|
182
220
|
|
|
183
221
|
def run(
|
|
184
222
|
self, args: Namespace, api_client: ApiClient, telemetry_client: TelemetryClient
|
|
@@ -245,7 +283,7 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
245
283
|
self.sort_point_lat = args.sort_point_lat
|
|
246
284
|
self.sort_point_lng = args.sort_point_lng
|
|
247
285
|
self.clusters = args.clusters
|
|
248
|
-
#self.describe_arguments = args.describe_arguments
|
|
286
|
+
# self.describe_arguments = args.describe_arguments
|
|
249
287
|
self.no_magic = args.no_magic
|
|
250
288
|
self.premium = args.premium
|
|
251
289
|
self._apply_similar()
|
|
@@ -366,7 +404,9 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
366
404
|
telemetry_data["employers"][employer_id] = employer_data
|
|
367
405
|
|
|
368
406
|
if not do_apply:
|
|
369
|
-
logger.debug(
|
|
407
|
+
logger.debug(
|
|
408
|
+
"Останавливаем рассылку откликов, так как достигли лимита, попробуйте через сутки."
|
|
409
|
+
)
|
|
370
410
|
break
|
|
371
411
|
|
|
372
412
|
if relations:
|
|
@@ -455,13 +495,13 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
455
495
|
"per_page": per_page,
|
|
456
496
|
"order_by": self.order_by,
|
|
457
497
|
}
|
|
458
|
-
|
|
498
|
+
|
|
459
499
|
if self.search:
|
|
460
500
|
params["text"] = self.search
|
|
461
501
|
if self.schedule:
|
|
462
|
-
params[
|
|
502
|
+
params["schedule"] = self.schedule
|
|
463
503
|
if self.experience:
|
|
464
|
-
params[
|
|
504
|
+
params["experience"] = self.experience
|
|
465
505
|
if self.currency:
|
|
466
506
|
params["currency"] = self.currency
|
|
467
507
|
if self.salary:
|
|
@@ -471,7 +511,7 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
471
511
|
if self.date_from:
|
|
472
512
|
params["date_from"] = self.date_from
|
|
473
513
|
if self.date_to:
|
|
474
|
-
params["date_to"] = self.date_to
|
|
514
|
+
params["date_to"] = self.date_to
|
|
475
515
|
if self.top_lat:
|
|
476
516
|
params["top_lat"] = self.top_lat
|
|
477
517
|
if self.bottom_lat:
|
|
@@ -512,7 +552,7 @@ class Operation(BaseOperation, GetResumeIdMixin):
|
|
|
512
552
|
params["premium"] = _bool(self.premium)
|
|
513
553
|
if self.responses_count_enabled is not None:
|
|
514
554
|
params["responses_count_enabled"] = _bool(self.responses_count_enabled)
|
|
515
|
-
|
|
555
|
+
|
|
516
556
|
return params
|
|
517
557
|
|
|
518
558
|
def _get_vacancies(self, per_page: int = 100) -> list[VacancyItem]:
|
|
@@ -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=iVnmYgYC2MjzTHc-zzJpyLklNy9SyNQ29ySMJ97XrO0,24414
|
|
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=FG_43P5GWmfKUggkKZqDznQ2_iBJ3zrZtv8yEI2XOXQ,4527
|
|
@@ -26,7 +26,7 @@ hh_applicant_tool/operations/whoami.py,sha256=pNWJMmEQLBk3U6eiGz4CHcX7eXzDXcfezF
|
|
|
26
26
|
hh_applicant_tool/telemetry_client.py,sha256=1EKZWc5kMx2yERW9SrR9vaf-OB6M_KKcMXeicH5YyY0,3834
|
|
27
27
|
hh_applicant_tool/types.py,sha256=sQbt_vGXtWPRJ3UzcUkE87BTHOaGTsFxqdZa_qFghZE,864
|
|
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.10.dist-info/METADATA,sha256=Vmcl9F_QP4ZrT31Xe6m-dMP_cvZQj5_KN_me_u3M5wE,21402
|
|
30
|
+
hh_applicant_tool-0.6.10.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
31
|
+
hh_applicant_tool-0.6.10.dist-info/entry_points.txt,sha256=Vb7M2YaYLMtKYJZh8chIrXZApMzSRFT1-rQw-U9r10g,65
|
|
32
|
+
hh_applicant_tool-0.6.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|