Skip to content

Commit

Permalink
Merge pull request subzeroid#2 from Jmallone/main
Browse files Browse the repository at this point in the history
fix indentation
  • Loading branch information
Stiveknx authored Mar 3, 2022
2 parents 9bad3be + 632ec6c commit fffb131
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Open in browser [http://localhost:8000/docs](http://localhost:8000/docs) and fol
Get sessionid:

```
curl -X 'GET' \
curl -X 'POST' \
'http://localhost:8000/auth/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fastapi==0.65.1
uvicorn==0.11.3
ipython>=7.17.0
instagrapi>=1.12.19
instagrapi>=1.16.12
python-multipart==0.0.5
Pillow==8.1.1
moviepy==1.0.3
Expand All @@ -10,7 +10,7 @@ httpx==0.17.1
pudb==2021.1
ipdb==0.13.9
aiofiles==0.7.0
requests<3.0,>=2.25.1
requests==2.26.0
starlette~=0.14.2
pytest~=6.2.4
tinydb==4.5.1
10 changes: 7 additions & 3 deletions routers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
)


def challenge_code_handler(username, choice, challenge_url, session):
def challenge_code_handler(username, choice, challenge_url, session=None):
# Aqui salva o challenge_url e os headers e os cookies que tão nessa session
print(f"username:{username} \n CHOICE:{choice}")
print(f"URL:{challenge_url} \n session {session}")

return False

@router.post("/login")
Expand Down Expand Up @@ -67,9 +70,10 @@ async def challenge_code(sessionid: str = Form(...),
## Aqui você puxa os headers, os cookies e o challenge_url que você salvou na linha 14 e chama o checkpoint_resume
old_session = ""
challenge_url = ""
if(old_session)

if(old_session):
result = cl.resume_checkpoint(code, challenge_url, old_session)
else
else:
result = cl.send_checkpoint_code(code, challenge_url)
return result

Expand Down

0 comments on commit fffb131

Please sign in to comment.