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

bi authentication bug workaround #406

Merged
merged 1 commit into from
Apr 19, 2024
Merged

bi authentication bug workaround #406

merged 1 commit into from
Apr 19, 2024

Conversation

addie9800
Copy link
Collaborator

After discovering a bug that BI US sometimes prints incomplete articles, the closest @MaxDall and I got to tracing the issue is that there seems to be some kind of error within the authentication of premium users of the US bi website. The incomplete version is a slight modification of the complete version, where the main content is within another div container, which is blocked from view, when using a browser. What triggers whether or not they ask for a premium login could not be determined. So, the workaround is to expand the selectors to cover both cases.

Copy link
Collaborator

@MaxDall MaxDall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for giving this a shot 👍 I think the paragraph selector could be simplified by utilizing optional path nodes like //(.|div[...])

@addie9800
Copy link
Collaborator Author

Thanks for giving this a shot 👍 I think the paragraph selector could be simplified by utilizing optional path nodes like //(.|div[...])

Yeah, I also tried that, but as it turns out that's a XPath 2.0 feature and lxml only supports XPath 1.0. Trying this results in an Exception raised by lxml

@MaxDall
Copy link
Collaborator

MaxDall commented Apr 19, 2024

Yeah, I also tried that, but as it turns out that's a XPath 2.0 feature and lxml only supports XPath 1.0. Trying this results in an Exception raised by lxml

Good to know! I thought I added it once, but i guess I forgot about the part where an exception was thrown.

@addie9800 addie9800 merged commit 155aa42 into master Apr 19, 2024
5 checks passed
@addie9800 addie9800 deleted the bi-us-premium branch April 19, 2024 16:47
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