scrapinghub / scrapinghub/python-scrapinghub

Include stats property to Job instance

Open
#102 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

More than once I needed to get the stats of a job using scrapinghub library, but it is not well documented that I can find this information using job.metadata.get("scrapystats") (the information is there but it took a while for me to figure out how to get the job stats).

As this seems (at least for my latest usages of the library), something that it is used frequently, what do you think to include a new property in Job to return the dictionary with the job stats (similar to items.Items.stats()).

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

Locate the Job implementation and compare its existing metadata access with the documented Items.stats() behavior. Confirm how job.metadata.get("scrapystats") is represented, then verify that the new Job property returns the job statistics dictionary consistently with Items.stats().

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.