tweepy-self 1.10.0b4__py3-none-any.whl → 1.10.0b6__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.
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tweepy-self
|
3
|
-
Version: 1.10.
|
3
|
+
Version: 1.10.0b6
|
4
4
|
Summary: Twitter (selfbot) for Python!
|
5
5
|
Home-page: https://github.com/alenkimov/tweepy-self
|
6
6
|
Author: Alen
|
@@ -161,7 +161,7 @@ if await twitter_client.totp_is_enabled():
|
|
161
161
|
await twitter_client.enable_totp()
|
162
162
|
```
|
163
163
|
|
164
|
-
#### Логин, если включен TOTP (
|
164
|
+
#### Логин, если включен TOTP (2FA)
|
165
165
|
```python
|
166
166
|
import twitter
|
167
167
|
|
@@ -10,7 +10,7 @@ twitter/account.py,sha256=joAB5Zw-Le5E3kOZ-1nb4DPGlTqWYv2Vs6gJ3cwu7is,3175
|
|
10
10
|
twitter/base/__init__.py,sha256=Q2ko0HeOS5tiBnDVKxxaZYetwRR3YXJ67ujL3oThGd4,141
|
11
11
|
twitter/base/client.py,sha256=J_iL4ZGfwTbZ2gpjtFCbBxNgt7weJ55EeMGzYsLtjf4,500
|
12
12
|
twitter/base/session.py,sha256=JFPS-9Qae1iY3NfNcywxvWWmRDijaU_Rjs3WaQ00iFA,2071
|
13
|
-
twitter/client.py,sha256=
|
13
|
+
twitter/client.py,sha256=zcW31OYf4Y9NvfgH2V5rnmdHXSa6tRFdxVuKvy_JyEw,70579
|
14
14
|
twitter/enums.py,sha256=-OH6Ibxarq5qt4E2AhkProVawcEyIf5YG_h_G5xiV9Y,270
|
15
15
|
twitter/errors.py,sha256=oNa0Neos80ZK4-0FBzqgxXonH564qFnoN-kavHalfR4,5274
|
16
16
|
twitter/models.py,sha256=7yObMPUUEwJEbraHzFwmUKd91UhR2-zyfJTm4xIqrSQ,4834
|
@@ -18,6 +18,6 @@ twitter/utils/__init__.py,sha256=usxpfcRQ7zxTTgZ-i425tT7hIz73Pwh9FDj4t6O3dYg,663
|
|
18
18
|
twitter/utils/file.py,sha256=Sz2KEF9DnL04aOP1XabuMYMMF4VR8dJ_KWMEVvQ666Y,1120
|
19
19
|
twitter/utils/html.py,sha256=nrOJw0vUKfBaHgFaQSQIdXfvfZ8mdu84MU_s46kJTJ4,2087
|
20
20
|
twitter/utils/other.py,sha256=9RIYF2AMdmNKIwClG3jBP7zlvxZPEgYfuHaIiOhURzM,1061
|
21
|
-
tweepy_self-1.10.
|
22
|
-
tweepy_self-1.10.
|
23
|
-
tweepy_self-1.10.
|
21
|
+
tweepy_self-1.10.0b6.dist-info/METADATA,sha256=9RkGszuiywuEgKLozQNVo_usGEgJ3ismzwnsVGqZkc4,13153
|
22
|
+
tweepy_self-1.10.0b6.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
23
|
+
tweepy_self-1.10.0b6.dist-info/RECORD,,
|
twitter/client.py
CHANGED
@@ -296,6 +296,7 @@ class Client(BaseHTTPClient):
|
|
296
296
|
async def on_startup(self):
|
297
297
|
if self._update_account_info_on_startup:
|
298
298
|
await self.update_account_info()
|
299
|
+
await self.establish_status()
|
299
300
|
|
300
301
|
async def _request_oauth2_auth_code(
|
301
302
|
self,
|
@@ -466,7 +467,7 @@ class Client(BaseHTTPClient):
|
|
466
467
|
|
467
468
|
user = await self._request_user_by_username(username)
|
468
469
|
|
469
|
-
if user and user.
|
470
|
+
if user and user.username == self.account.username:
|
470
471
|
self.account.update(**user.model_dump())
|
471
472
|
return self.account
|
472
473
|
|
@@ -1516,8 +1517,8 @@ class Client(BaseHTTPClient):
|
|
1516
1517
|
"key": "user_identifier",
|
1517
1518
|
"response_data": {
|
1518
1519
|
"text_data": {
|
1519
|
-
"result": self.account.
|
1520
|
-
or self.account.
|
1520
|
+
"result": self.account.username
|
1521
|
+
or self.account.email
|
1521
1522
|
}
|
1522
1523
|
},
|
1523
1524
|
}
|
@@ -1610,6 +1611,13 @@ class Client(BaseHTTPClient):
|
|
1610
1611
|
flow_token, subtasks = await self._request_login_tasks()
|
1611
1612
|
for _ in range(2):
|
1612
1613
|
flow_token, subtasks = await self._login_enter_user_identifier(flow_token)
|
1614
|
+
|
1615
|
+
subtask_ids = [subtask["subtask_id"] for subtask in subtasks]
|
1616
|
+
|
1617
|
+
if "LoginEnterAlternateIdentifierSubtask" in subtask_ids:
|
1618
|
+
if not self.account.username:
|
1619
|
+
raise ValueError("No username to relogin")
|
1620
|
+
|
1613
1621
|
flow_token, subtasks = await self._login_enter_password(flow_token)
|
1614
1622
|
flow_token, subtasks = await self._account_duplication_check(flow_token)
|
1615
1623
|
|
@@ -1627,6 +1635,12 @@ class Client(BaseHTTPClient):
|
|
1627
1635
|
await self._finish_task(flow_token)
|
1628
1636
|
|
1629
1637
|
async def relogin(self):
|
1638
|
+
"""
|
1639
|
+
Может вызвать следующую ошибку:
|
1640
|
+
twitter.errors.BadRequest: (response status: 400)
|
1641
|
+
(code 398) Can't complete your signup right now.
|
1642
|
+
Причина возникновения ошибки неизвестна. Не забудьте обработать ее.
|
1643
|
+
"""
|
1630
1644
|
if not self.account.email and not self.account.username:
|
1631
1645
|
raise ValueError("No email or username")
|
1632
1646
|
|
File without changes
|