leadguru-jobs 0.719.0__py3-none-any.whl → 0.720.0__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.
- {leadguru_jobs-0.719.0.dist-info → leadguru_jobs-0.720.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.719.0.dist-info → leadguru_jobs-0.720.0.dist-info}/RECORD +6 -6
- {leadguru_jobs-0.719.0.dist-info → leadguru_jobs-0.720.0.dist-info}/WHEEL +1 -1
- lgt_jobs/lgt_common/slack_client/slack_client.py +1 -35
- lgt_jobs/lgt_data/models/notifications/notification.py +4 -2
- {leadguru_jobs-0.719.0.dist-info → leadguru_jobs-0.720.0.dist-info}/top_level.txt +0 -0
@@ -37,7 +37,7 @@ lgt_jobs/lgt_common/pubsub/messages.py,sha256=rm7uKbxwDTWJqsVA8Kee-4YT58bThjCEV2
|
|
37
37
|
lgt_jobs/lgt_common/pubsub/pubsubfactory.py,sha256=rfUDooYuhBQ2pE9FdDxZOpXjbrvlpiiQLCGOtnTFbSg,2204
|
38
38
|
lgt_jobs/lgt_common/slack_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
39
|
lgt_jobs/lgt_common/slack_client/methods.py,sha256=ctKF_1UHEmSWaRsoGEgMZicVabV7eEufZ7pjxdMAx8g,1455
|
40
|
-
lgt_jobs/lgt_common/slack_client/slack_client.py,sha256=
|
40
|
+
lgt_jobs/lgt_common/slack_client/slack_client.py,sha256=1OfF5v11l-NtOHlobGvNlqLmHecmyd8QtxT9v9Ozh3g,14018
|
41
41
|
lgt_jobs/lgt_common/slack_client/web_client.py,sha256=WCu8mqYhauuxp9iDAMsjocchKD78iWdcnbu7Ozdyzq8,3448
|
42
42
|
lgt_jobs/lgt_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
43
|
lgt_jobs/lgt_data/analytics.py,sha256=yfrFPXrBofzZqUNn479JkrbZXDa2ljgk-Le0YrQ9rew,21690
|
@@ -78,7 +78,7 @@ lgt_jobs/lgt_data/models/leads/extended_lead.py,sha256=ezFrKv-f5GBXr3QAM-V_qJQ-i
|
|
78
78
|
lgt_jobs/lgt_data/models/leads/lead.py,sha256=mTZh8YV06nX9OWYvv_X7rDdIperB-RPChrEuheeYMU0,1300
|
79
79
|
lgt_jobs/lgt_data/models/leads/message.py,sha256=7mXwYfSpmhY_zC8TfUdAZzxsPP-02bOqVjdkN4Vid5s,1533
|
80
80
|
lgt_jobs/lgt_data/models/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
81
|
-
lgt_jobs/lgt_data/models/notifications/notification.py,sha256=
|
81
|
+
lgt_jobs/lgt_data/models/notifications/notification.py,sha256=PNUxI5UwurqnYszNS-zSPoUYsGfbWoVsurE-7vybyAY,25284
|
82
82
|
lgt_jobs/lgt_data/models/notifications/notification_settings.py,sha256=2GS2mNQkgVUqY0WgOzC6-IZDp77FeZvUeutfJyHdvMQ,2870
|
83
83
|
lgt_jobs/lgt_data/models/people/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
84
|
lgt_jobs/lgt_data/models/people/people.py,sha256=pm60uMVmNIxOGCBAtZWhmXSJOe0SJ4C1y_HurUq00oY,3420
|
@@ -108,7 +108,7 @@ lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
108
108
|
lgt_jobs/services/k8_manager.py,sha256=bXpka9psIQ5UJ6QG_e4xolmE_3gtmNrzzZeL03bJ62I,995
|
109
109
|
lgt_jobs/services/web_client.py,sha256=oMyWJxwGeIe3f40fPT7xcisjDg3BhA3Ipf8dr1jVT-Y,1549
|
110
110
|
lgt_jobs/templates/new_message.html,sha256=dZl8UmdAOOMq4nidvAgMFroSrTV7Pw0RWt2yLp_2idg,6989
|
111
|
-
leadguru_jobs-0.
|
112
|
-
leadguru_jobs-0.
|
113
|
-
leadguru_jobs-0.
|
114
|
-
leadguru_jobs-0.
|
111
|
+
leadguru_jobs-0.720.0.dist-info/METADATA,sha256=-Dw0KAbC-4XzT55wAIsK96tdbwyql9vE7qERM6131Ls,1399
|
112
|
+
leadguru_jobs-0.720.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
113
|
+
leadguru_jobs-0.720.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
114
|
+
leadguru_jobs-0.720.0.dist-info/RECORD,,
|
@@ -4,7 +4,6 @@ import requests
|
|
4
4
|
import json
|
5
5
|
import io
|
6
6
|
from urllib import parse
|
7
|
-
from pyppeteer import launch
|
8
7
|
from requests import Response
|
9
8
|
from websockets.client import WebSocketClientProtocol
|
10
9
|
from lgt_jobs.lgt_common.slack_client.methods import SlackMethods
|
@@ -213,40 +212,7 @@ class SlackClient:
|
|
213
212
|
payload = {'email': email, 'locale': locale}
|
214
213
|
headers = {'User-Agent': user_agent}
|
215
214
|
response = requests.post(f"{self.base_url}{SlackMethods.confirm_email}", data=payload, headers=headers)
|
216
|
-
|
217
|
-
|
218
|
-
print(f"Result is {result}")
|
219
|
-
if not result:
|
220
|
-
print("Start pyppeteer")
|
221
|
-
try:
|
222
|
-
async def send_code():
|
223
|
-
print("Launch browser")
|
224
|
-
browser = await launch(headless=True)
|
225
|
-
page = await browser.newPage()
|
226
|
-
|
227
|
-
print("Go to Slack")
|
228
|
-
await page.goto('https://slack.com/signin', waitUntil='networkidle2')
|
229
|
-
|
230
|
-
print("Type email")
|
231
|
-
await page.waitForSelector('input#signup_email')
|
232
|
-
await page.type('input#signup_email', email)
|
233
|
-
await asyncio.sleep(1.324)
|
234
|
-
|
235
|
-
print("Press the button to submit")
|
236
|
-
button = await page.querySelector('button#submit_btn')
|
237
|
-
await button.tap()
|
238
|
-
|
239
|
-
print("Wait for the next page")
|
240
|
-
await page.waitForSelector('input[aria-label="digit 1 of 6"]')
|
241
|
-
|
242
|
-
print("Close the browser")
|
243
|
-
await browser.close()
|
244
|
-
|
245
|
-
asyncio.run(send_code())
|
246
|
-
return True
|
247
|
-
except:
|
248
|
-
return False
|
249
|
-
return result
|
215
|
+
return response.json()['ok'] if response.status_code == 200 else False
|
250
216
|
|
251
217
|
def confirm_code(self, email: str, code: str, user_agent: str) -> requests.Response:
|
252
218
|
payload = {'email': email, 'code': code}
|
@@ -147,7 +147,8 @@ class IncomingMessageNotification(Notification):
|
|
147
147
|
for user_id in user_ids[:3]:
|
148
148
|
user = [user for user in users if user_id == user['sender_id']][0]
|
149
149
|
photo = user.get('images', {}).get('image_72', '{{ IMAGE_PERSON.src }}')
|
150
|
-
|
150
|
+
name = user['real_name'] if user.get('real_name') else user.get('display_name', '')
|
151
|
+
item = self.name_html_item.replace('$$USER_NAME$$', name)
|
151
152
|
item = item.replace('$$USER_IMAGE$$', photo)
|
152
153
|
title += item
|
153
154
|
|
@@ -249,7 +250,8 @@ class InboxNotification(Notification):
|
|
249
250
|
for user_id in user_ids[:3]:
|
250
251
|
user = [user for user in users if user_id == user['sender_id']][0]
|
251
252
|
photo = user.get('images', {}).get('image_72', '{{ IMAGE_PERSON.src }}')
|
252
|
-
|
253
|
+
name = user['real_name'] if user.get('real_name') else user.get('display_name', '')
|
254
|
+
item = self.name_html_item.replace('$$USER_NAME$$', name)
|
253
255
|
item = item.replace('$$USER_IMAGE$$', photo)
|
254
256
|
title += item
|
255
257
|
|
File without changes
|