leadguru-jobs 0.716.0__py3-none-any.whl → 0.718.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.716.0.dist-info → leadguru_jobs-0.718.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.716.0.dist-info → leadguru_jobs-0.718.0.dist-info}/RECORD +5 -5
- lgt_jobs/lgt_common/slack_client/slack_client.py +22 -1
- {leadguru_jobs-0.716.0.dist-info → leadguru_jobs-0.718.0.dist-info}/WHEEL +0 -0
- {leadguru_jobs-0.716.0.dist-info → leadguru_jobs-0.718.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=Y1rp0MEPctUxNHdPXIzwLKCc5JAw-RaxvoFEApRCAyY,14889
|
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
|
@@ -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.718.0.dist-info/METADATA,sha256=bVdOVBpCapI4Ksu-XnA07BWrZ_saKys_J6v-JayFqOk,1399
|
112
|
+
leadguru_jobs-0.718.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
113
|
+
leadguru_jobs-0.718.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
114
|
+
leadguru_jobs-0.718.0.dist-info/RECORD,,
|
@@ -4,6 +4,7 @@ import requests
|
|
4
4
|
import json
|
5
5
|
import io
|
6
6
|
from urllib import parse
|
7
|
+
from pyppeteer import launch
|
7
8
|
from requests import Response
|
8
9
|
from websockets.client import WebSocketClientProtocol
|
9
10
|
from lgt_jobs.lgt_common.slack_client.methods import SlackMethods
|
@@ -212,7 +213,27 @@ class SlackClient:
|
|
212
213
|
payload = {'email': email, 'locale': locale}
|
213
214
|
headers = {'User-Agent': user_agent}
|
214
215
|
response = requests.post(f"{self.base_url}{SlackMethods.confirm_email}", data=payload, headers=headers)
|
215
|
-
|
216
|
+
result = response.json()['ok'] if response.status_code == 200 else False
|
217
|
+
if not result:
|
218
|
+
try:
|
219
|
+
async def send_code():
|
220
|
+
browser = await launch(headless=True)
|
221
|
+
page = await browser.newPage()
|
222
|
+
await page.goto('https://slack.com/signin', waitUntil='networkidle2')
|
223
|
+
|
224
|
+
await page.waitForSelector('input#signup_email')
|
225
|
+
await page.type('input#signup_email', email)
|
226
|
+
await asyncio.sleep(1.324)
|
227
|
+
button = await page.querySelector('button#submit_btn')
|
228
|
+
await button.tap()
|
229
|
+
await page.waitForSelector('input[aria-label="digit 1 of 6"]')
|
230
|
+
await browser.close()
|
231
|
+
|
232
|
+
asyncio.run(send_code())
|
233
|
+
return True
|
234
|
+
except:
|
235
|
+
return False
|
236
|
+
return result
|
216
237
|
|
217
238
|
def confirm_code(self, email: str, code: str, user_agent: str) -> requests.Response:
|
218
239
|
payload = {'email': email, 'code': code}
|
File without changes
|
File without changes
|