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

LinkInfo/LinkContext's linked and inline fields for HTML-extracted URLs are not always bools #458

Open
JustAnotherArchivist opened this issue Feb 9, 2021 · 0 comments
Labels

Comments

@JustAnotherArchivist
Copy link
Contributor

Per the documentation of both wpull.scraper.html.LinkInfo and wpull.scraper.base.LinkContext, the linked and inline fields are supposed to be bools. However, that is not always the case: the ElementWalker's is_link_inline and is_html_link routines may return 1 and 2, respectively, instead of True due to the bit flag shenanigans in those methods. Fortunately, this has no effect in wpull because non-zero integers are truthy. But it's still a bug in the API.

@JustAnotherArchivist JustAnotherArchivist changed the title LinkInfo/LinkContext's linked and inline fields for HTML-extracted URLs are not always a bool LinkInfo/LinkContext's linked and inline fields for HTML-extracted URLs are not always bools Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant