User
Difference between revisions of "Cewbot"
(+) |
(+) |
||
Line 3: | Line 3: | ||
# Login Lingua Libre with the account, and browser [[Special:BotPasswords]], create a bot password, e.g., "LinguaLibrebot@LinguaLibrebot". | # Login Lingua Libre with the account, and browser [[Special:BotPasswords]], create a bot password, e.g., "LinguaLibrebot@LinguaLibrebot". | ||
# The code for login: | # The code for login: | ||
− | <syntaxhighlight> | + | <syntaxhighlight lang="JavaScript"> |
const wiki = new Wikiapi; | const wiki = new Wikiapi; | ||
await wiki.login({ | await wiki.login({ |
Revision as of 01:19, 27 April 2021
To create a bot at Lingua Libre using npm - wikiapi:
- Create a account at Wikimedia Commons. The account should includes "bot".
- Login Lingua Libre with the account, and browser Special:BotPasswords, create a bot password, e.g., "LinguaLibrebot@LinguaLibrebot".
- The code for login:
const wiki = new Wikiapi;
await wiki.login({
user_name: "LinguaLibrebot@LinguaLibrebot",
password: 'password',
API_URL: 'https://lingualibre.org/api.php'
});