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

Bug? Selector parsing error: Expected selector indicator after ']' #160

Open
lorenzogrv opened this issue Sep 22, 2021 · 2 comments
Open

Comments

@lorenzogrv
Copy link

Hi there, and thx for this awesome tool.

While developing an html <table> to JSON extractor, I've found something that seems a bug. I could share here the original HTML source, but I think it's better to provide a simplified example:

# HTML to exemplify
cat >input.html <<HTML
<table>
  <tr>
    <th>X</th>
    <th>Y</th>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
  </tr>
  <tr>
    <td colspan="2">Hey, Let's break your ninja script</td>
  </tr>
  <tr>
    <td>1</td>
    <td>0</td>
  </tr>
</table>
HTML
# works as expected
$ <input.html pup 'table tr:not(:parent-of([colspan])) json{}'
# But fails when combined
$ <input.html  pup 'table tr:not(:parent-of([colspan])):not(:parent-of(th))'
Selector parsing error: Unmatched open brace '['
$ pup --version
0.4.0
$ uname -srvpio
Linux 5.4.0-84-generic #94~18.04.1-Ubuntu SMP Thu Aug 26 23:17:46 UTC 2021 x86_64 x86_64 GNU/Linux

Please let me know if I can help adding a test case.
L.

@Anshuman-bansal
Copy link

it is not installing on mac i have installed go and brew both and used both way but error comes
Screenshot 2021-09-26 at 10 25 34 PM

@lorenzogrv
Copy link
Author

lorenzogrv commented Sep 29, 2021

it is not installing on mac i have installed go and brew both and used both way but error comes (image omited)

@objectgrind I'm pretty sure your problem is not related to this particular issue I've opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants