Git Product home page Git Product logo

Comments (5)

eirikurn avatar eirikurn commented on May 20, 2024

+1 - It seems this functionality is also missing or broken for children().

from cheerio.

matthewmueller avatar matthewmueller commented on May 20, 2024

Thanks, I've updated the issue.

These filters are really baked into jQuery, so I'm trying to find a good balance between implementing what jQuery has and rolling my own internals.

from cheerio.

matthewmueller avatar matthewmueller commented on May 20, 2024

@eirikurn Hey, so I got a chance to look at this closer – it looks like children(selector) was implemented. Do you have an example of it not working?

from cheerio.

eirikurn avatar eirikurn commented on May 20, 2024

Yeah, I kinda meant it was broken, or didn't work like in jQuery...

Currently it applies the selector filter onto all descendants... like find(), instead of applying it only on the immediate children of the matched elements. Or that's how it looked to me in my test case and looking at the code.

Great library though. I can't wait for soupselect to learn more selectors (like > + ~ and some : filters), and htmlparser to become more forgiving (for pages that forget closing tags). Guess I should put on my contribution gloves soon :)

from cheerio.

matthewmueller avatar matthewmueller commented on May 20, 2024

Thanks! Oh okay yah good call - definitely goes deeper than 1 level. I'll fix this soon - thanks for point it out!

Haha, yah that would be nice - soupselect and node-htmlparser haven't been updated in foreverrr. The pending pull requests for each of those libraries have some goodies and I'm starting to think I need to assume responsibility for them :-/

from cheerio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.