Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
d60 authored Mar 17, 2024
1 parent 16f29e9 commit 1d3a9b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion twikit/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ def _execute_task(
)
task_id = response['subtasks'][0]['subtask_id']


if task_id == 'LoginAcid':
print(find_dict(response, 'secondary_text')[0]['text'])
response = _execute_task(
Expand Down
14 changes: 14 additions & 0 deletions twikit/twikit_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@ async def _execute_task(
task_id = response['subtasks'][0]['subtask_id']
self._user_id = find_dict(response, 'id_str')[0]

if task_id == 'LoginTwoFactorAuthChallenge':
print(find_dict(response, 'secondary_text')[0]['text'])
response = await _execute_task(
flow_token,
{
'subtask_id': 'LoginTwoFactorAuthChallenge',
'enter_text': {
'text': input('>>> '),
'link': 'next_link'
}
}
)
task_id = response['subtasks'][0]['subtask_id']

if task_id == 'LoginAcid':
print(find_dict(response, 'secondary_text')[0]['text'])
response = await _execute_task(
Expand Down

0 comments on commit 1d3a9b2

Please sign in to comment.