Skip to content

Conversation

@krzysdabro
Copy link
Contributor

  • Replace regex with HTML parsers
  • Move doWebAuth to VWWebSession
  • Split doWebAuth into multiple methods
  • Add Terms and Conditions form handling

@tillsteinbach
Copy link
Owner

Thank you for your contribution. This looks great! I have one thing where I'm unsure. I was also thinking in the past of automatically accepting terms and conditions and decided not to do it and ask the user to do it himself. The reason is that the user otherwise accepts something he will definitely not have looked at. While we all know that anyway no one will read the terms I'm fearing that just automatically accepting Terms and Conditions could be a reason for VW to be upset and to lock us out of the API.

@tillsteinbach
Copy link
Owner

I checked out the branch, but I get this error right away:
2024-12-19T18:47:40+0100:CRITICAL:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: Retrieving credentials page was not successful, status code: 400

- Replace regex with HTML parsers
- Move doWebAuth to VWWebSession
- Split doWebAuth into multiple methods
- Add Terms and Conditions form handling
@krzysdabro
Copy link
Contributor Author

It looks like double slash in URL is a no-go. I've updated the solution to use urljoin. Additionally, I’ve added a switch for accepting terms, which is set to False by default to maintain the previous behavior.

In my case, handling the terms is necessary because VW somehow can't save that I have accepted them and prompts me every time I log in through the library.

@tillsteinbach
Copy link
Owner

tillsteinbach commented Dec 20, 2024

In my case, handling the terms is necessary because VW somehow can't save that I have accepted them and prompts me every time I log in through the library.

Also if you comment out this:
7a0eafc

@tillsteinbach
Copy link
Owner

I checked out the branch, but I get this error right away: 2024-12-19T18:47:40+0100:CRITICAL:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: Retrieving credentials page was not successful, status code: 400

This error is gone now for me.

@krzysdabro
Copy link
Contributor Author

krzysdabro commented Dec 21, 2024

In my case, handling the terms is necessary because VW somehow can't save that I have accepted them and prompts me every time I log in through the library.

Also if you comment out this: 7a0eafc

I didn't help, I am instantly redirected to the terms-and-conditions page.

I have already rebased the branch and this conditional is gone.

@tillsteinbach tillsteinbach merged commit fb69de8 into tillsteinbach:main Dec 21, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants