Closed anzaikk closed 4 weeks ago
This PR updates core functionality by removing an account duplication check during login and updating domain references from twitter.com to x.com to align with Twitter's rebranding.
sequenceDiagram
participant User
participant Client
participant Flow
participant TwitterException
User->>Client: Initiate login
Client->>Flow: Check task_id
alt task_id is 'DenyLoginSubtask'
Flow->>TwitterException: Raise exception
end
Flow-->>Client: Return if no subtasks
Client-->>User: Login successful
Change | Details | Files |
---|---|---|
Removed account duplication check during login flow |
|
twikit/client/client.py |
Updated domain references from twitter.com to x.com |
|
twikit/client/gql.py twikit/guest/client.py |
[!CAUTION]
Review failed
The pull request is closed.
This pull request introduces several changes across multiple files. The .gitignore
file is updated to exclude the __pycache__/
directory, ensuring that compiled Python files are not tracked by Git. In the twikit/client/client.py
, the login
method of the Client
class is modified by removing the AccountDuplicationCheck
subtask, simplifying the login flow. Additionally, the twikit/client/gql.py
file updates the base URL in the Endpoint
class from Twitter to X. Lastly, the twikit/guest/client.py
file modifies the 'Referer' header in the GuestClient
class to reflect the new domain.
File | Change Summary |
---|---|
.gitignore | Added entry to exclude __pycache__/ directory. |
twikit/client/client.py | Modified login method by removing AccountDuplicationCheck and adjusting error handling. Updated method signature. |
twikit/client/gql.py | Updated base URL in Endpoint class from https://twitter.com/i/api/graphql/ to https://x.com/i/api/graphql/ . |
twikit/guest/client.py | Changed 'Referer' header value from https://twitter.com/ to https://x.com/ . |
sequenceDiagram
participant User
participant Client
participant AuthService
User->>Client: Initiate login
Client->>AuthService: Retrieve guest token
Client->>User: Prompt for password
User->>Client: Enter password
Client->>User: Prompt for TOTP (if required)
User->>Client: Enter TOTP (if required)
Client->>AuthService: Authenticate user
AuthService-->>Client: Return authentication result
Client-->>User: Login success/failure
🐇 In the code, a change we see,
To tidy up our repository!
The login flow is now quite neat,
With fewer checks, it’s a swift feat.
From Twitter to X, we hop along,
A new domain, where we belong! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
更新核心代码
Summary by Sourcery
Update core code by removing the 'AccountDuplicationCheck' subtask execution and changing URL references from 'twitter.com' to 'x.com'.
Enhancements:
Chores:
Summary by CodeRabbit
New Features
Bug Fixes
Chores
__pycache__/
directory to.gitignore
for a cleaner repository.