Skip to content

querySelector() missing elementΒ #290

@martinreus

Description

@martinreus

Hello,

first of all, thanks for this library, it is awesome!
I was using it to parse some rental ads websites and I think I might have found a slight issue with the querySelector - and also querySelectorAll

when I try to

  const adFile = readFileSync("./adFile.html", "utf-8");

  const parsed = parse(adFile);
  const propDiv = parsed.querySelector(`div[itemProp="description"]`);

on this file, propDiv will be returned null, when in fact it probably should find div with content

<div itemProp="description">Unit 1 - 61 Mackay Avenue

<p><u>Key Features:</u></p><ul><li>3 Bedroom / 1 Bathroom Main Floor Unit</li><li></div>

in the html file. It works fine for other files such as this one

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions