Skip to content

Suggestion - Select all given selector #30

@BarryThrill

Description

@BarryThrill

Hello!

I admire this amazing package where it has helped me both with work and also better knowledge! Its amazing!

I would like to give a suggestion and maybe this already has this function without me knowing it but I was thinking if there is a possibility to do a sort of selection of selectors. etc (Which I got inspiration from bs4):

    selector= SoupStrainer(["h1", "a"])
    bs4 = soup(response.text, 'lxml', parse_only=strainer)

what it basically does, instead of having the whole HTML printed out, it only prints out all that contains h1 & a in this case which saves more resources instead of needing to pull out the whole HTML everytime to scrape. If this is a possibility of course?

Admire your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions