Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Token can no longer be parsed from document.cookie #41

Open
cainejette opened this issue Jul 7, 2020 · 3 comments
Open

API Token can no longer be parsed from document.cookie #41

cainejette opened this issue Jul 7, 2020 · 3 comments

Comments

@cainejette
Copy link

Looks like it is no longer included, or is encoded somehow.

$ pipenv run python export.py --concurrent-requests 3 github/
Loading .env environment variables…
Traceback (most recent call last):
  File "export.py", line 179, in <module>
    loop.run_until_complete(main())
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "export.py", line 161, in main
    token = await _fetch_api_token(session, base_url)
  File "export.py", line 102, in _fetch_api_token
    raise Exception("Could not parse API token from remote data! Regex requires updating.")
Exception: Could not parse API token from remote data! Regex requires updating.
@cainejette
Copy link
Author

Although grabbing the value from the emoji.list POST call that slack in the browser makes worked!

@cainejette
Copy link
Author

Although when I plug in the information of another workspace I want to upload emojis to, no go:

$ pipenv run python upload.py github/*.png
Loading .env environment variables…
Traceback (most recent call last):
  File "upload.py", line 183, in <module>
    main()
  File "upload.py", line 111, in main
    session = _session(args)
  File "upload.py", line 40, in _session
    session.api_token = _fetch_api_token(session)
  File "upload.py", line 106, in _fetch_api_token
    raise ParseError("No api_token found in page")
__main__.ParseError: No api_token found in page

@cainejette
Copy link
Author

It looks like the mechanism for retrieving the api token differs between export.py and upload.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant