Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encourage setting a user agent #50

Open
nikkiwd opened this issue Aug 21, 2021 · 0 comments
Open

Encourage setting a user agent #50

nikkiwd opened this issue Aug 21, 2021 · 0 comments

Comments

@nikkiwd
Copy link

nikkiwd commented Aug 21, 2021

Wikimedia's user agent policy says:

If you run a bot, please send a User-Agent header identifying the bot with an identifier that isn't going to be confused with many other bots, and supplying some way of contacting you

and then provides a recommended format to use.

To encourage people to provide a custom user agent, it would help if the documentation would more prominently feature setting a user agent: Rather than only mentioning it as an advanced use case (which it shouldn't be), it could be introduced much earlier on and included in the examples. The example file helloworld.js could set a user agent too.

Perhaps it could also support passing the name, version and contact information via the constructor to make it easier for people to use the suggested format too, e.g.

let bot = new MWBot({ name: "ExampleBot", version: "0.1", contact: "<contact info>" });

which would internally set the user agent string to ExampleBot/0.1 (<contact info>) mwbot/<mwbot version>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant