question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

kijiji_api.KijijiApiException: XSRF token not found in html text

See original GitHub issue

Not able to show ads anymore, I get the following error when I run the command: python kijiji_repost_headless [-u USERNAME] [-p PASSWORD] show

  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "kijiji_repost_headless/__main__.py", line 205, in <module>
    main()
  File "kijiji_repost_headless/__main__.py", line 51, in main
    args.function(args)
  File "kijiji_repost_headless/__main__.py", line 106, in show_ads
    api.login(args.username, args.password)
  File "kijiji_repost_headless/kijiji_api.py", line 111, in login
    "xsrfToken": get_xsrf_token(resp.text),
  File "kijiji_repost_headless/kijiji_api.py", line 84, in get_xsrf_token
    raise KijijiApiException("XSRF token not found in html text.", html)
kijiji_api.KijijiApiException: XSRF token not found in html text.
See kijijiapi_dump_20200530T191135.html in current directory for latest dumpfile.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ArthurGcommented, Jun 9, 2020

I believe this is fixed in #181. Please open a new issue if you find it still occurs.

1reaction
rybodiddlycommented, Jun 6, 2020

@ArthurG Nice 😉 Byte code is pretty easy to reverse. I just uploaded the original source Here The decomp is close, but it mangles the if statements a little. Anyways, use what you need. Also, kijiji has switched to http2.0 protocols. So the requests module works for some things, but has troubles with others. So I used httpx to solve my issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kijijiapi/kijijiapi.py at master · adrienverge/kijijiapi - GitHub
class TokenException(KijijiAPIException):. def __str__(self):. return 'Could not get token.\n'+super().__str__(). class KijijiAPI:.
Read more >
XSRF-TOKEN not added to cookies by Angular (Client side ...
In my case, Angular does not add XSRF-TOKEN cookies because I am using a different domain for client and API. To resolve this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found