Policy talk:User-Agent policy: Difference between revisions

From Wikimedia Foundation Governance Wiki
Latest comment: 2 years ago by APaskulin (WMF) in topic Python code example
Content deleted Content added
m Bot: Archiving 1 thread (older than 60 days) to Talk:User-Agent policy/Archives/2016
Line 7: Line 7:
|minthreadstoarchive = 1
|minthreadstoarchive = 1
}}
}}




== Python code example ==
== Python code example ==

Can a Python code example be added? I'm violating the policy, but I don't know, what I need to add to stop violating it. [[Special:Contributions/82.147.226.240|82.147.226.240]] 08:23, 8 April 2022 (UTC)
Can a Python code example be added? I'm violating the policy, but I don't know, what I need to add to stop violating it. [[Special:Contributions/82.147.226.240|82.147.226.240]] 08:23, 8 April 2022 (UTC)


Line 17: Line 20:
How should API access through browser fetch() calls comply with the user-agent policy? It seems this can only be done for server-api-call applications.
How should API access through browser fetch() calls comply with the user-agent policy? It seems this can only be done for server-api-call applications.
I am writing an alternative interface for wikipedia through the API calls (with all the other performance items listed in mind ofcourse, such as setting fetch limits). Thanks!
I am writing an alternative interface for wikipedia through the API calls (with all the other performance items listed in mind ofcourse, such as setting fetch limits). Thanks!

== Client evaluation ==

Worth noting, compliance to this policy was part of the [[mw:Evaluating and Improving MediaWiki web API client libraries]] by [[User:Fhocutt]] in 2014.

The client evaluation caused Pywikibot to add support for a customised user-agent, with the default user-agent automatically adding the username; see [[mw:Manual:Pywikibot/User-agent]].
[[User:John Vandenberg|John Vandenberg]] ([[User talk:John Vandenberg|talk]]) 10:24, 21 March 2016 (UTC)


== More strict contact information ==
== More strict contact information ==

Revision as of 07:55, 9 April 2022

User:MiszaBot/config


Python code example

Can a Python code example be added? I'm violating the policy, but I don't know, what I need to add to stop violating it. 82.147.226.240 08:23, 8 April 2022 (UTC)Reply

I added a Python example using Requests. Hope this helps! APaskulin (WMF) (talk) 00:46, 9 April 2022 (UTC)Reply

API access through browser fetch()

How should API access through browser fetch() calls comply with the user-agent policy? It seems this can only be done for server-api-call applications. I am writing an alternative interface for wikipedia through the API calls (with all the other performance items listed in mind ofcourse, such as setting fetch limits). Thanks!

More strict contact information

As User:Mforns (WMF) has mentioned above, the existing policy wrt providing contact information is loose. Working together with the ops and client community we could improve that part of the policy and perform audits on client compliance assisted by analytics data identifying the main non-compliant clients that need to be upgraded.

For example, we could change the 'e.g.' to be a fixed list of only three options:

  1. email,
  2. URL with an email address prominently placed on the page,
  3. interwiki syntax enclosed in [[ ]] where the first prefix in the interwiki is a valid interwiki prefix present on Interwiki Map.
    1. If it is a user page, special:emailuser must be enabled for the linked user.
    2. Otherwise an email address must be prominently placed on the page.

John Vandenberg (talk) 14:43, 21 March 2016 (UTC)Reply

I cant download images with a .net console application

I am trying to download about 250 images to my pc with a script. I am waiting 5 seconds in between each image, so as to not use too much bandwidth. I have followed all the user agent suggestions as closely as I can. this is my user agent string "bot by <My Name> (<My email address>) I am downloading an image of each carnivoran once (less than 300 images) for educational purposes" You say, make it descriptive, include the word bot if its a bot, include contact details in parentheses, all of which I have done. But I still get this error after downloading 3 images System.Net.WebException: 'The remote server returned an error: (403) Forbidden. Please comply with the User-Agent policy: https://meta.wikimedia.org/wiki/User-Agent_policy. ' I have posted about this on stack overflow, you can see the code in question.

https://stackoverflow.com/questions/69230731/wikipedia-user-agent-problem-when-downloading-images

—Preceding unsigned comment added by 89.106.141.56 (talkcontribs) 11:47, 18 September 2021 (UTC)Reply

Refresh needed

This page needs a refresh, better thematic segmentation. I came with the will to edit it but the translates tags makes me reluctant to edit. If you have experience in those and want to team up to revamp this page, ping me. Yug (talk) 22:33, 28 December 2021 (UTC)Reply

Done, sorta. Enterprisey (talk) 22:45, 3 March 2022 (UTC)Reply