openzim / openzim/python-scraperlib
Pass proper user-agent in `stream_file` when host is `upload.wikimedia.org`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31
- Forks
- 27
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 2
Description
For files hosted on upload.wikimedia.org, we must comply with their User-Agent policy at https://meta.wikimedia.org/wiki/User-Agent_policy
Doing so at scraperlib level in stream_file (main methods using in many scraper to download files / assets) would help avoid having to do so in every scraper (and forget about it over and over).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the stream_file implementation and review how it handles downloads for upload.wikimedia.org. Read the linked Wikimedia User-Agent policy, then verify that requests to that host use a compliant User-Agent without requiring changes in each scraper. The issue mentions no specific test file, so add or update coverage where the existing stream_file tests are located.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100