Policy talk:User-Agent policy

From Wikimedia Foundation Governance Wiki
Revision as of 08:04, 15 February 2016 by Nemo bis (talk | contribs) (→‎bot: seconded)

I'm trying to run a script to collect some data from Wikipedia for the first time and I've run into this measure. Is there any way I could see the format of the user_agent string that Wikimedia expects so as to properly format my settings? I tried a vernacular description, but still ended up with the "give a descriptive user agent" response. Elijahmeeks 02:05, 11 April 2011 (UTC)[reply]

Never mind, I didn't realize I had to set it in curl instead of as the usual initialization.Elijahmeeks 02:26, 11 April 2011 (UTC)[reply]

Posting

Strangely enough, I get the message about a temporary server problem unless I take out this line:

curl_setopt($ch,CURLOPT_POST,TRUE);

Not sure why that might be. Leucosticte (talk) 09:26, 4 August 2012 (UTC)[reply]

"temporary server problem" is strange indeed, but i bet it is "you're sending a POST request when the server expect a GET request". Divinity76 (talk) 12:43, 12 March 2013 (UTC)[reply]

Does my bot need a bot user agent?

I'm working on an irc bot. I want to make it have a command !wikipedia <something>. The command will print the first 300 or so letters of the wikipedia article on <something>. As it will just read data from pages, do I need a bot user agent? Thanks. 76.246.45.128 02:36, 28 March 2013 (UTC)[reply]

Yes. Anomie (talk) 12:39, 28 March 2013 (UTC)[reply]
Ok, thanks. It has a bot user agent now :) 76.246.52.64 03:55, 4 April 2013 (UTC)[reply]

User-Agent restriction or lack thereof

According to the article, the various MediaWiki sites are supposed to generate errors given an empty/missing/blacklisted User-Agent string. Is this supposed to be only on editing or all the time? Skimming the old discussion, it sounds like all requests should fail, but I just tried sending various read-only requests to multiple MW sites with no/empty/"lwp bla" User-Agents via both index.php and api.php and they all came back fine. What gives? RobinHood70 (talk) 07:42, 26 August 2014 (UTC)[reply]

MediaWiki? This is described as a Wikimedia policy. Also, it says "may"; there is probably a soft enforcement. --Nemo 10:18, 26 August 2014 (UTC)[reply]
Oops, forgot to monitor this page and only noticed your reply now. I had meant Wikimedia, not MediaWiki. My bad. I hadn't thought of a soft enforcement scenario. Thanks for that. RobinHood70 (talk) 15:28, 3 December 2014 (UTC)[reply]

WikimediaBot

There is a proposal by the Analytics team to require that 'bots' add 'WikimediaBot' to their user-agent even for reads. See https://lists.wikimedia.org/pipermail/analytics/2016-January/004858.html John Vandenberg (talk) 10:32, 28 January 2016 (UTC)[reply]

Perhaps they should propose it on wikitech-l where people are likely to actually see it. Anomie (talk) 14:30, 28 January 2016 (UTC)[reply]

bot

The following was added[1]:

"Also, if you run a bot or any automated system that could generate non-human traffic, please consider including the word "bot" (in any combination of lowercase or uppercase letters) in the User-Agent string. This will help Wikimedia's systems to better isolate human traffic and provide more accurate statistics."

I don't believe this has been discussed on wikitech-l yet. I think it has only been discussed on the analytics mailing list.

How does adding 'bot' help over and above including email addresses and URLs in the User-Agent? Are there significant cases of human traffic browsers including email addresses and URLs in the User-Agent?

Or, is adding 'bot' an alternative to including email addresses and URLs? John Vandenberg (talk) 21:34, 12 February 2016 (UTC)[reply]

Seconded. I didn't immediately revert the addition because the beginning of the page says "This page is purely informative" and "As of 2015, no user agent requirement is technically enforced in general". But this page is supposed to be very stable, hence things should be discussed first. Nemo 08:04, 15 February 2016 (UTC)[reply]