openzim / openzim/python-scraperlib

Pass proper user-agent in `stream_file` when host is `upload.wikimedia.org`

Open
#214 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.