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

Support multiple filters in CDX search #127

Merged
merged 6 commits into from
Sep 25, 2023

Conversation

Mr0grog
Copy link
Member

@Mr0grog Mr0grog commented Sep 25, 2023

The filter_field parameter for WaybackClient.search() can now be a list or tuple of strings, letting you add multiple filters. For example, to search for all captures at nasa.gov with a 404 status and “feature” somewhere in the URL:

client.search('nasa.gov/',
              match_type='prefix',
              from_date=date(2022, 1, 1),
              to_date=date(2022, 2, 1),
              filter_field=['statuscode:404',
                            'urlkey:.*feature.*'])

Thanks to @BilibalaX for starting this in #120.

@Mr0grog Mr0grog linked an issue Sep 25, 2023 that may be closed by this pull request
@Mr0grog Mr0grog merged commit f7aa5d8 into main Sep 25, 2023
11 checks passed
@Mr0grog Mr0grog deleted the 120-filters-and-filters-and-more-filters branch September 25, 2023 01:44
This pull request was closed.
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

Successfully merging this pull request may close these issues.

Multiple filter?
2 participants