You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
Per the documentation of both
wpull.scraper.html.LinkInfo
andwpull.scraper.base.LinkContext
, thelinked
andinline
fields are supposed to be bools. However, that is not always the case: theElementWalker
'sis_link_inline
andis_html_link
routines may return1
and2
, respectively, instead ofTrue
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.The text was updated successfully, but these errors were encountered: