scrapinghub / scrapinghub/python-scrapinghub

Filter all tags instead of just a subset

Open
#123 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
205
Forks
62
PR merge metrics
No merged PRs in 30d

Description

We're looking into using the has_tag param in the jobs.iter() method: https://github.com/scrapinghub/python-scrapinghub/blob/master/scrapinghub/client/jobs.py#L89

However, it behaves as an OR operator. Is there a way to have an AND operator for this API?

We're looking to pass a list of tags to have a more accurate filtering of jobs, so having the AND operator would really help.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scrapinghub/client/jobs.py at the jobs.iter() implementation around line 89 and inspect how the has_tag parameter is passed to the API. Determine whether the API supports combining multiple tags with AND semantics; done means documenting or exposing a way to filter jobs by all supplied tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.