Skip to content

Reading local files (stylesheets, images) referenced in HTML #30

@manfromarce

Description

@manfromarce

When converting a saved HTML page, it seems there is no way to specify the base directory.
For example, a stylesheet can be specified like this and be contained in the same folder as the HTML file:
<link rel="stylesheet" href="style.css">
and the same may occur for images.
So I created a custom class similar to HttpClientNetworkLoader which tries to access local files via FileStream, but it didn't work:

  • it throws an exception before reaching GetResourceStream because the stylesheet is not found
  • GetResourceStream is not called for local images so they are not preserved even if the full absolute URL is built

Is there a proper way to access both local and online resources like browsers do when opening a saved HTML page?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions