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
I was writing a fuzzer for a cybersecurity assignment, and it crashed when it tried to find the links on a PDF file. I think it would make more sense to return that there are no links, if the page fails to parse. This seems relatively straightforward to implement.
The text was updated successfully, but these errors were encountered:
npetrangelo
changed the title
links() should return an empty list if self.page is None
browser.links() should return an empty list if self.page is None
Nov 29, 2022
Thanks for the suggestion! However, I think it might be misleading to have StatefulBrowser.links return an empty list if no page is currently loaded. It's a very different case than having a page with no links. Can you elaborate a bit more on the use case? Would the following be useful in your application?
links= [] ifbr.pageisNoneelsebr.links()
At the very least, we could improve the error message when you call StatefulBrowser.links without having a page loaded.
I was writing a fuzzer for a cybersecurity assignment, and it crashed when it tried to find the links on a PDF file. I think it would make more sense to return that there are no links, if the page fails to parse. This seems relatively straightforward to implement.
The text was updated successfully, but these errors were encountered: