hh-applicant-tool 0.5.1__py3-none-any.whl → 0.5.2__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.

@@ -5,8 +5,9 @@ from datetime import datetime, timedelta, timezone
5
5
 
6
6
  from ..api import ApiClient, ClientError
7
7
  from ..constants import INVALID_ISO8601_FORMAT
8
- from ..main import BaseOperation, get_api
8
+ from ..main import BaseOperation
9
9
  from ..main import Namespace as BaseNamespace
10
+ from ..main import get_api
10
11
  from ..types import ApiListResponse
11
12
  from ..utils import print_err, truncate_string
12
13
 
@@ -19,14 +20,21 @@ class Namespace(BaseNamespace):
19
20
 
20
21
 
21
22
  class Operation(BaseOperation):
22
- """Отменяет старые заявки, скрывает отказы с опциональной блокировкой работодателя."""
23
+ """Отменяет старые отклики, скрывает отказы с опциональной блокировкой работодателя."""
23
24
 
24
25
  def setup_parser(self, parser: argparse.ArgumentParser) -> None:
25
26
  parser.add_argument(
26
27
  "--older-than",
27
28
  type=int,
28
29
  default=30,
29
- help="Удалить заявки старше опр. кол-ва дней. По умолчанию: %(default)d",
30
+ help="Удалить отклики старше опр. кол-ва дней. По умолчанию: %(default)d",
31
+ )
32
+ parser.add_argument(
33
+ "--all",
34
+ type=bool,
35
+ default=False,
36
+ action=argparse.BooleanOptionalAction,
37
+ help="Удалить все отклики в тч с приглашениями",
30
38
  )
31
39
  parser.add_argument(
32
40
  "--blacklist-discard",
@@ -61,7 +69,8 @@ class Operation(BaseOperation):
61
69
  # hidden True
62
70
  is_discard = state["id"] == "discard"
63
71
  if not item["hidden"] and (
64
- is_discard
72
+ args.all
73
+ or is_discard
65
74
  or (
66
75
  state["id"] == "response"
67
76
  and (
@@ -72,7 +81,11 @@ class Operation(BaseOperation):
72
81
  )
73
82
  )
74
83
  ):
75
- r = api.delete(f"/negotiations/active/{item['id']}")
84
+ decline_allowed = item.get("decline_allowed") or False
85
+ r = api.delete(
86
+ f"/negotiations/active/{item['id']}",
87
+ with_decline_message=decline_allowed,
88
+ )
76
89
  assert {} == r
77
90
  vacancy = item["vacancy"]
78
91
  print(
@@ -160,15 +160,15 @@ class Operation(BaseOperation, GetResumeIdMixin):
160
160
  print("💼", message_placeholders["vacancy_name"])
161
161
  print("📅", vacancy["created_at"])
162
162
  if salary:
163
- salary_from = salary.get("from", "-")
164
- salary_to = salary.get("to", "-")
163
+ salary_from = salary.get("from")or "-"
164
+ salary_to = salary.get("to")or "-"
165
165
  salary_currency = salary.get("currency")
166
166
  print("💵 от", salary_from, "до", salary_to, salary_currency)
167
167
  print("")
168
168
  print("Последние сообщения:")
169
169
  for msg in (
170
- message_history[:1] + ["..."] + message_history[-2:]
171
- if len(message_history) > 3
170
+ message_history[:1] + ["..."] + message_history[-3:]
171
+ if len(message_history) > 5
172
172
  else message_history
173
173
  ):
174
174
  print(msg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hh-applicant-tool
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary:
5
5
  Author: Senior YAML Developer
6
6
  Author-email: yamldeveloper@proton.me
@@ -43,11 +43,10 @@ asdf/pyenv/conda и что-то еще.
43
43
 
44
44
  ![image](https://github.com/user-attachments/assets/a0cce1aa-884b-4d84-905a-3bb207eba4a3)
45
45
 
46
+ > Если в веб-интерфейсе выставить фильтры, то они будут применяться в скрипте при отклике на подходящие
46
47
 
47
48
  ### Предыстория
48
49
 
49
- Был один знакомый знакомого, который работал хрюшей. Этот чувак не заморачивался с чтением резюме, а тупо скриптами рассылал предложения о работе... Бывают, конечно, филологини, которые не могут отличить Java от JavaScript, но я думаю, что <s>в значительном числе случаев, тут имеют место такие вот рассылки</s> они просто идиотки... И я тупо стал спамить как они. Мне уже было просто лень читать весь этот бред, что пишут долбоебы в описании вакансий. Там стандартное ООП, алгоритмы и прочая хуета... Вроде все подходят, а вроде хз — все не мое.
50
-
51
50
  Долгое время я делал массовые заявки с помощью консоли браузера:
52
51
 
53
52
  ```js
@@ -11,17 +11,17 @@ hh_applicant_tool/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
11
11
  hh_applicant_tool/operations/apply_similar.py,sha256=iMHbuqNYogL-cfP_RYxKTkWnWQDRWgiY0YACWw3Glzw,14811
12
12
  hh_applicant_tool/operations/authorize.py,sha256=TyUTCSOGwSYVJMEd5vSI981LRRI-RZf8hnlVYhtRVwA,3184
13
13
  hh_applicant_tool/operations/call_api.py,sha256=qwPDrWP9tiqHkaYYWYBZtymj9AaxObB86Eny-Bf5q_c,1314
14
- hh_applicant_tool/operations/clear_negotiations.py,sha256=98Yuw9xP4dN5sUnUKlZxqfhU40TQ-aCjK4vj4LRTeYo,3894
14
+ hh_applicant_tool/operations/clear_negotiations.py,sha256=GEsL1snxz8TJ3i7Nz6LkP4FZOzRBdAofX3xf3Ywj64k,4369
15
15
  hh_applicant_tool/operations/get_employer_contacts.py,sha256=7BEzEnNAp87RlOP6HX0LR6cbtud2FuKCKK5sq6fINq8,4066
16
16
  hh_applicant_tool/operations/list_resumes.py,sha256=XBrVFTnl45BUtuvjVm70h_CXZrOvAULnLkLkyUh7gxw,1134
17
17
  hh_applicant_tool/operations/refresh_token.py,sha256=hYTmzBzJFSsb-LDO2_w0Y30WVWsctIH7vTzirkLwzWo,1267
18
- hh_applicant_tool/operations/reply_employers.py,sha256=pcD1Uxmaixw7LSebDE2bUot67HRxbgghR9mvuW2MBUk,8660
18
+ hh_applicant_tool/operations/reply_employers.py,sha256=_kINrCKAPQBIjHSbeI9I5ycNPkSyvMTMDFrM7B-6lcA,8662
19
19
  hh_applicant_tool/operations/update_resumes.py,sha256=gGxMYMoT9GqJjwn4AgrOAEJCZu4sdhaV0VmPr3jG-q8,1049
20
20
  hh_applicant_tool/operations/whoami.py,sha256=sg0r7m6oKkpMEmGt4QdtYdS-1gf-1KKdnk32yblbRJs,714
21
21
  hh_applicant_tool/telemetry_client.py,sha256=wYLbKnx3sOmESFHqjLt-0Gww1O3lJiXFYdWnsorIhK8,3261
22
22
  hh_applicant_tool/types.py,sha256=q3yaIcq-UOkPzjxws0OFa4w9fTty-yx79_dic70_dUM,843
23
23
  hh_applicant_tool/utils.py,sha256=OsdjzUa76VC8vihHu27rD5df9DWqRzpvJr3PsdfJzNE,3071
24
- hh_applicant_tool-0.5.1.dist-info/METADATA,sha256=-xswxfCHwrU43KuTRfJHFHLz4TRqRn3AqaCPXKmNrQk,19553
25
- hh_applicant_tool-0.5.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
26
- hh_applicant_tool-0.5.1.dist-info/entry_points.txt,sha256=Vb7M2YaYLMtKYJZh8chIrXZApMzSRFT1-rQw-U9r10g,65
27
- hh_applicant_tool-0.5.1.dist-info/RECORD,,
24
+ hh_applicant_tool-0.5.2.dist-info/METADATA,sha256=SRkuIiIKfSA6WF8_4sh_iDeutRuyDbxgYBjo-x9eHms,18778
25
+ hh_applicant_tool-0.5.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
26
+ hh_applicant_tool-0.5.2.dist-info/entry_points.txt,sha256=Vb7M2YaYLMtKYJZh8chIrXZApMzSRFT1-rQw-U9r10g,65
27
+ hh_applicant_tool-0.5.2.dist-info/RECORD,,