tweepy-self 1.10.0b4__tar.gz → 1.10.0b6__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/PKG-INFO +2 -2
  2. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/README.md +1 -1
  3. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/pyproject.toml +1 -1
  4. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/client.py +17 -3
  5. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/__init__.py +0 -0
  6. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/__init__.py +0 -0
  7. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/core/__init__.py +0 -0
  8. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/core/base.py +0 -0
  9. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/core/config.py +0 -0
  10. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/core/enum.py +0 -0
  11. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/core/serializer.py +0 -0
  12. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/_capsolver/fun_captcha.py +0 -0
  13. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/account.py +0 -0
  14. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/base/__init__.py +0 -0
  15. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/base/client.py +0 -0
  16. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/base/session.py +0 -0
  17. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/enums.py +0 -0
  18. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/errors.py +0 -0
  19. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/models.py +0 -0
  20. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/utils/__init__.py +0 -0
  21. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/utils/file.py +0 -0
  22. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/utils/html.py +0 -0
  23. {tweepy_self-1.10.0b4 → tweepy_self-1.10.0b6}/twitter/utils/other.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tweepy-self
3
- Version: 1.10.0b4
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 (2F)
164
+ #### Логин, если включен TOTP (2FA)
165
165
  ```python
166
166
  import twitter
167
167
 
@@ -135,7 +135,7 @@ if await twitter_client.totp_is_enabled():
135
135
  await twitter_client.enable_totp()
136
136
  ```
137
137
 
138
- #### Логин, если включен TOTP (2F)
138
+ #### Логин, если включен TOTP (2FA)
139
139
  ```python
140
140
  import twitter
141
141
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "tweepy-self"
3
- version = "1.10.0.b4"
3
+ version = "1.10.0.b6"
4
4
  description = "Twitter (selfbot) for Python!"
5
5
  authors = ["Alen <alen.kimov@gmail.com>"]
6
6
  readme = "README.md"
@@ -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.id == self.account.id:
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.email
1520
- or self.account.username
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