scrapinghub / shub

Scrapinghub Command Line Client

Home Page:https://shub.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search feature

mirceachira opened this issue · comments

It would be awesome to have a search option for shub to look for jobs.

It's often the case that I have to find a broken job starting just from an url and I had to implement a script that cycles through all the jobs and through all the requests of each individual job in a project to find the one I'm looking for. The search could be configured in many way, see this example:

$ my_search_script.py --project_key="<project key>" --spider="amazon" --date_from="last week" --includes="<some url contet>"
> Bingo!  123456/12/123
> Bingo!  987654/32/1
> Done!

This could be extended so you could look for a job starting from part of an url, item field, argument etc. You could also search for jobs that have error or critical level logs which would help with debugging.

I thought this might be a good thing to have for shub and would be happy to add it here directly instead of maintaining an internal tool.

Hey @vshlapakov, I opened a pr for this #370
It has only the search by part of an url feature but I think it's a starting point. Let me know what you think :)