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

Is it possible to remove elements (or exclude them before printing)? #7

Open
wislem opened this issue May 8, 2016 · 3 comments
Open

Comments

@wislem
Copy link

wislem commented May 8, 2016

How does the exlude() method work?

I'm trying this:

$dom = hQuery::fromUrl('http://example.com');

$content = $dom->find('.content');

$content->exclude('.panel');

$content->html; //final html still has the <div class="panel"> inside it.

Thank you in advance!

@wislem wislem changed the title How does the exlude() method work? Is it possible to remove elements (or exclude them before printing)? May 8, 2016
@duzun
Copy link
Owner

duzun commented May 10, 2016

The exclude() method is an unfinished attempt to implement some advanced filtering (it is neither documented, nor tested).

It is related to #4.

Suggestions and PRs are welcome!

@wislem
Copy link
Author

wislem commented May 10, 2016

I'd love to have the time to contribute since your package looks really promising. But I'm currently being under the pressure of a project that needs a fast and efficient php web scraper.

I'll try searching some more.

Thank you for taking the time to answer!

@ivancg18
Copy link

ivancg18 commented May 7, 2018

Hi,
Any news about excluding node/element?, I'm trying with the exclude method but I can not get it to work ...

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

No branches or pull requests

3 participants