Cleanup TR login handling, remove app login code and add a method to obtain the AWS WAF token using playwright#327
Conversation
|
@Felixoid would you mind having a look? |
Felixoid
left a comment
There was a problem hiding this comment.
Pretty straightforward changes with improved code. Some minor points to highlight 👍
|
Tested PR #327 locally on macOS. Good news: it improved things enough that I got past the old Bad news: repeated attempts were still unstable:
I also verified that at one point only So PR #327 definitely helps, but for me login is still not reliably reproducible. |
|
Tested on windows, even though "AWS WAF token obtained", but always getting 405 Client Error: Not Allowed for url. |
|
I tried to fix the issue myself and it worked reliably, consider using "playwright" just open a real browser session and extract cookies (incl. aws waf token) then close the browser, use it for the login and it worked reliably for me. |
|
I added code to use playwright for obtaining the aws waf cookie. It works for me. Please try and test. I took parts of the suggestion from @gtom06 here: #319 (comment) |
|
Works for me, nice! (Previously I also had #330 ) |
|
Ran uvx playwright install chromium because it failed with before doing so. Then ran uvx --from git+https://github.com/pytr-org/pytr@16e7e06a86c5dedd1fa94059b8ca56ca9c937df1 pytr dl_docs --last_days 21 --dump-raw-data ~/Downloads/pytr-downloadwhich failed with |
|
@morremeyer does it still happen after you clean the cookies* files in ~/.pytr ? |
|
No, that fixed it. Thank you! |
|
That works! The only thing is that I get a yellow line "no subfolder mapping for ......(stockname) Sparplan ausgeführt". |
This PR improves TR log in handling, fixes a few bugs and removes the app login.
In detail: