-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cheerio versions > 0.3.0 fail when trying to get access to selectors nested two or more levels deep. #18
Comments
Thanks @ccarollo for your kind words. I'll look into this problem. In the meantime could you fix the formatting of this issue? It's making everything a link - I think you need to indent the outermost |
I couldn't get the formatting resolved so I went ahead and made a gist. I have update the original issue with the gist url. Hope this helps and thanks for looking into the issue. |
This issue is because of a recursion problem in htmlparser2. I've sent a patch which was accepted, but the current release still doesn't have it. If you would like to fix the issue, go to your nearest childs = filterArray(test, childs, limit); to childs = filterArray(test, childs, recurse, limit); Hope this helps. |
@ccarollo Did this get resolved? |
Yes this appears to be resolved. It looks as though the bug in HTMLParser2 was the culprit and since @siddMahen's fix was included in version 2.1.2 of HTMLParser2 all is good. Thanks for everyones help. |
Hi Matthew,
First off, really like Cheerio. Great work! Fast and easy to use. We are using it heavily and have been able to develop quickly with it.
However, since 0.3.0 we are no longer able to get to nested divs that are two or more levels deep and render additional data in those elements. Here is an example.
I have template that looks like the following:
https://gist.github.com/1500031
When I try to do something like the following it used to work and now it fails.
template = get('games.html');
$ = gamefly.cheerio.load(template);
$('.ttl').text("Call of Duty");
This appears to fail starting with 0.3.1. Any ideas?
Thanks
Christian
The text was updated successfully, but these errors were encountered: