CINXE.COM
维基百科:製作機器人 - 维基百科,自由的百科全书
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="zh" dir="ltr"> <head> <meta charset="UTF-8"> <title>维基百科:製作機器人 - 维基百科,自由的百科全书</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )zhwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh", "wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRequestId":"74614a1f-ba61-451c-827e-fa5ffc562ef6","wgCanonicalNamespace":"Project","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":4,"wgPageName":"Wikipedia:製作機器人","wgTitle":"製作機器人","wgCurRevisionId":75667260,"wgRevisionId":75667260,"wgArticleId":1368586,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["过期的翻译条目","維基百科機器人"],"wgPageViewLanguage":"zh","wgPageContentLanguage":"zh","wgPageContentModel":"wikitext","wgRelevantPageName":"Wikipedia:製作機器人","wgRelevantArticleId":1368586,"wgUserVariant":"zh","wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true, "wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"zh","pageLanguageDir":"ltr","pageVariantFallbacks":["zh-hans","zh-hant","zh-cn","zh-tw","zh-hk","zh-sg","zh-mo","zh-my"]},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":30000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgDiscussionToolsFeaturesEnabled":{"replytool":true,"newtopictool":true,"sourcemodetoolbar":true,"topicsubscription":false,"autotopicsub":false,"visualenhancements":false,"visualenhancements_reply":false,"visualenhancements_pageframe":false},"wgDiscussionToolsFallbackEditMode":"source","wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q9384748","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform", "platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.large-font":"ready","ext.gadget.OldAfD":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.discussionTools.init.styles":"ready","oojs-ui-core.styles":"ready","oojs-ui.styles.indicators":"ready","mediawiki.widgets.styles":"ready","oojs-ui-core.icons":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.tablesorter.styles":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=[ "ext.cite.ux-enhancements","mediawiki.page.media","site","mediawiki.page.ready","jquery.tablesorter","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.edit0","ext.gadget.WikiMiniAtlas","ext.gadget.UnihanTooltips","ext.gadget.Difflink","ext.gadget.pseudonamespace-UI","ext.gadget.SpecialWikitext","ext.gadget.switcher","ext.gadget.VariantAlly","ext.gadget.AdvancedSiteNotices","ext.gadget.hideConversionTab","ext.gadget.internalLinkHelper-altcolor","ext.gadget.noteTA","ext.gadget.NavFrame","ext.gadget.collapsibleTables","ext.gadget.scrollUpButton","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.discussionTools.init","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","wikibase.client.vector-2022", "ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=zh&modules=ext.cite.styles%7Cext.discussionTools.init.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cjquery.tablesorter.styles%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.indicators%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=zh&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=zh&modules=ext.gadget.OldAfD%2Clarge-font&only=styles&skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=zh&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="维基百科:製作機器人 - 维基百科,自由的百科全书"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//zh.m.wikipedia.org/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" type="application/x-wiki" title="编辑本页" href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (zh)"> <link rel="EditURI" type="application/rsd+xml" href="//zh.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://zh.wikipedia.org/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh" href="https://zh.wikipedia.org/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hans" href="https://zh.wikipedia.org/zh-hans/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hans-CN" href="https://zh.wikipedia.org/zh-cn/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hans-MY" href="https://zh.wikipedia.org/zh-my/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hans-SG" href="https://zh.wikipedia.org/zh-sg/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hant" href="https://zh.wikipedia.org/zh-hant/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hant-HK" href="https://zh.wikipedia.org/zh-hk/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hant-MO" href="https://zh.wikipedia.org/zh-mo/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="zh-Hant-TW" href="https://zh.wikipedia.org/zh-tw/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="alternate" hreflang="x-default" href="https://zh.wikipedia.org/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh"> <link rel="alternate" type="application/atom+xml" title="Wikipedia的Atom feed" href="/w/index.php?title=Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="ext-discussiontools-replytool-enabled ext-discussiontools-newtopictool-enabled ext-discussiontools-sourcemodetoolbar-enabled skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-4 ns-subject mw-editable page-Wikipedia_製作機器人 rootpage-Wikipedia_製作機器人 skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">跳转到内容</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="站点"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="主菜单" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">主菜单</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">主菜单</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">隐藏</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> 导航 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Wikipedia:%E9%A6%96%E9%A1%B5" title="访问首页[z]" accesskey="z"><span>首页</span></a></li><li id="n-indexpage" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%88%86%E7%B1%BB%E7%B4%A2%E5%BC%95" title="以分类索引搜寻中文维基百科"><span>分类索引</span></a></li><li id="n-Featured_content" class="mw-list-item"><a href="/wiki/Portal:%E7%89%B9%E8%89%B2%E5%85%A7%E5%AE%B9" title="查看中文维基百科的特色内容"><span>特色内容</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:%E6%96%B0%E8%81%9E%E5%8B%95%E6%85%8B" title="提供当前新闻事件的背景资料"><span>新闻动态</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9" title="列出维基百科中的最近修改[r]" accesskey="r"><span>最近更改</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:%E9%9A%8F%E6%9C%BA%E9%A1%B5%E9%9D%A2" title="随机载入一个页面[x]" accesskey="x"><span>随机条目</span></a></li> </ul> </div> </div> <div id="p-help" class="vector-menu mw-portlet mw-portlet-help" > <div class="vector-menu-heading"> 帮助 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:%E7%9B%AE%E5%BD%95" title="寻求帮助"><span>帮助</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:%E7%A4%BE%E7%BE%A4%E9%A6%96%E9%A1%B5" title="关于本计划、你可以做什么、应该如何做"><span>维基社群</span></a></li><li id="n-policy" class="mw-list-item"><a href="/wiki/Wikipedia:%E6%96%B9%E9%87%9D%E8%88%87%E6%8C%87%E5%BC%95" title="查看维基百科的方针和指引"><span>方针与指引</span></a></li><li id="n-villagepump" class="mw-list-item"><a href="/wiki/Wikipedia:%E4%BA%92%E5%8A%A9%E5%AE%A2%E6%A0%88" title="参与维基百科社群的讨论"><span>互助客栈</span></a></li><li id="n-Information_desk" class="mw-list-item"><a href="/wiki/Wikipedia:%E7%9F%A5%E8%AF%86%E9%97%AE%E7%AD%94" title="解答任何与维基百科无关的问题的地方"><span>知识问答</span></a></li><li id="n-conversion" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2" title="提出字词转换请求"><span>字词转换</span></a></li><li id="n-IRC" class="mw-list-item"><a href="/wiki/Wikipedia:IRC%E8%81%8A%E5%A4%A9%E9%A2%91%E9%81%93"><span>IRC即时聊天</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Wikipedia:%E8%81%94%E7%BB%9C%E6%88%91%E4%BB%AC" title="如何联络维基百科"><span>联络我们</span></a></li><li id="n-about" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%85%B3%E4%BA%8E" title="查看维基百科的简介"><span>关于维基百科</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Wikipedia:%E9%A6%96%E9%A1%B5" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="维基百科" src="/static/images/mobile/copyright/wikipedia-wordmark-zh.svg" style="width: 6.5625em; height: 1.375em;"> <img class="mw-logo-tagline" alt="自由的百科全书" src="/static/images/mobile/copyright/wikipedia-tagline-zh.svg" width="103" height="14" style="width: 6.4375em; height: 0.875em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:%E6%90%9C%E7%B4%A2" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="搜索维基百科[f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>搜索</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="搜索维基百科" aria-label="搜索维基百科" autocapitalize="sentences" title="搜索维基百科[f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:搜索"> </div> <button class="cdx-button cdx-search-input__end-button">搜索</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="个人工具"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="外观"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="更改页面字体大小、宽度和颜色的外观" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="外观" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">外观</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=zh.wikipedia.org&uselang=zh" class=""><span>资助维基百科</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&returnto=Wikipedia%3A%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" title="我们推荐您创建账号并登录,但这不是强制性的" class=""><span>创建账号</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&returnto=Wikipedia%3A%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" title="建议你登录,尽管并非必须。[o]" accesskey="o" class=""><span>登录</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="更多选项" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="个人工具" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">个人工具</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="用户菜单" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=zh.wikipedia.org&uselang=zh"><span>资助维基百科</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&returnto=Wikipedia%3A%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" title="我们推荐您创建账号并登录,但这不是强制性的"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>创建账号</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&returnto=Wikipedia%3A%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" title="建议你登录,尽管并非必须。[o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>登录</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> 未登录编辑者的页面 <a href="/wiki/Help:%E6%96%B0%E6%89%8B%E5%85%A5%E9%97%A8" aria-label="了解有关编辑的更多信息"><span>了解详情</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:%E6%88%91%E7%9A%84%E8%B4%A1%E7%8C%AE" title="来自此IP地址的编辑列表[y]" accesskey="y"><span>贡献</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:%E6%88%91%E7%9A%84%E8%AE%A8%E8%AE%BA%E9%A1%B5" title="对于来自此IP地址编辑的讨论[n]" accesskey="n"><span>讨论</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="站点"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="目录" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">目录</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">隐藏</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">序言</div> </a> </li> <li id="toc-为何需要机器人?" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#为何需要机器人?"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>为何需要机器人?</span> </div> </a> <ul id="toc-为何需要机器人?-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-製作机器人前先仔细想好" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#製作机器人前先仔细想好"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>製作机器人前先仔细想好</span> </div> </a> <ul id="toc-製作机器人前先仔细想好-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-维基机器人的工作原理" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#维基机器人的工作原理"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>维基机器人的工作原理</span> </div> </a> <button aria-controls="toc-维基机器人的工作原理-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>开关维基机器人的工作原理子章节</span> </button> <ul id="toc-维基机器人的工作原理-sublist" class="vector-toc-list"> <li id="toc-概论" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#概论"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>概论</span> </div> </a> <ul id="toc-概论-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-用API寫机器人" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#用API寫机器人"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>用API寫机器人</span> </div> </a> <ul id="toc-用API寫机器人-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-登入/建立新帳號" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#登入/建立新帳號"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>登入/建立新帳號</span> </div> </a> <ul id="toc-登入/建立新帳號-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-编辑;编辑令牌" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#编辑;编辑令牌"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.4</span> <span>编辑;编辑令牌</span> </div> </a> <ul id="toc-编辑;编辑令牌-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-编辑冲突" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#编辑冲突"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.5</span> <span>编辑冲突</span> </div> </a> <ul id="toc-编辑冲突-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-机器人制作过程概览" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#机器人制作过程概览"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>机器人制作过程概览</span> </div> </a> <button aria-controls="toc-机器人制作过程概览-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>开关机器人制作过程概览子章节</span> </button> <ul id="toc-机器人制作过程概览-sublist" class="vector-toc-list"> <li id="toc-构思" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#构思"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>构思</span> </div> </a> <ul id="toc-构思-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-细化" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#细化"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>细化</span> </div> </a> <ul id="toc-细化-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-软件架构" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#软件架构"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.3</span> <span>软件架构</span> </div> </a> <ul id="toc-软件架构-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-实现" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#实现"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.4</span> <span>实现</span> </div> </a> <ul id="toc-实现-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-测试" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#测试"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.5</span> <span>测试</span> </div> </a> <ul id="toc-测试-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-文档" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#文档"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.6</span> <span>文档</span> </div> </a> <ul id="toc-文档-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-询问和抱怨" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#询问和抱怨"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.7</span> <span>询问和抱怨</span> </div> </a> <ul id="toc-询问和抱怨-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-维护" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#维护"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.8</span> <span>维护</span> </div> </a> <ul id="toc-维护-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-运行机器人的一般准则" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#运行机器人的一般准则"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>运行机器人的一般准则</span> </div> </a> <button aria-controls="toc-运行机器人的一般准则-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>开关运行机器人的一般准则子章节</span> </button> <ul id="toc-运行机器人的一般准则-sublist" class="vector-toc-list"> <li id="toc-编写机器人的最佳做法" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#编写机器人的最佳做法"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.1</span> <span>编写机器人的最佳做法</span> </div> </a> <ul id="toc-编写机器人的最佳做法-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-应该考虑实现的常见机器人特征" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#应该考虑实现的常见机器人特征"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2</span> <span>应该考虑实现的常见机器人特征</span> </div> </a> <ul id="toc-应该考虑实现的常见机器人特征-sublist" class="vector-toc-list"> <li id="toc-人工协助" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#人工协助"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2.1</span> <span>人工协助</span> </div> </a> <ul id="toc-人工协助-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-停用机器人" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#停用机器人"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2.2</span> <span>停用机器人</span> </div> </a> <ul id="toc-停用机器人-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-签名" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#签名"> <div class="vector-toc-text"> <span class="vector-toc-numb">5.2.3</span> <span>签名</span> </div> </a> <ul id="toc-签名-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-开源机器人" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#开源机器人"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>开源机器人</span> </div> </a> <ul id="toc-开源机器人-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-编程语言和开发库" class="vector-toc-list-item vector-toc-level-1"> <a class="vector-toc-link" href="#编程语言和开发库"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>编程语言和开发库</span> </div> </a> <button aria-controls="toc-编程语言和开发库-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>开关编程语言和开发库子章节</span> </button> <ul id="toc-编程语言和开发库-sublist" class="vector-toc-list"> <li id="toc-Perl" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Perl"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.1</span> <span>Perl</span> </div> </a> <ul id="toc-Perl-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-PHP" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#PHP"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.2</span> <span>PHP</span> </div> </a> <ul id="toc-PHP-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Python" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Python"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.3</span> <span>Python</span> </div> </a> <ul id="toc-Python-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Microsoft_.NET" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Microsoft_.NET"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.4</span> <span>Microsoft .NET</span> </div> </a> <ul id="toc-Microsoft_.NET-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Java" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Java"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.5</span> <span>Java</span> </div> </a> <ul id="toc-Java-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-JavaScript" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#JavaScript"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.6</span> <span>JavaScript</span> </div> </a> <ul id="toc-JavaScript-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Ruby" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Ruby"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.7</span> <span>Ruby</span> </div> </a> <ul id="toc-Ruby-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Chicken_Scheme" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Chicken_Scheme"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.8</span> <span>Chicken Scheme</span> </div> </a> <ul id="toc-Chicken_Scheme-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Common_Lisp" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Common_Lisp"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.9</span> <span>Common Lisp</span> </div> </a> <ul id="toc-Common_Lisp-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Haskell" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Haskell"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.10</span> <span>Haskell</span> </div> </a> <ul id="toc-Haskell-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Tcl" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Tcl"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.11</span> <span>Tcl</span> </div> </a> <ul id="toc-Tcl-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-C++/Qt4.5" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#C++/Qt4.5"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.12</span> <span>C++/Qt4.5</span> </div> </a> <ul id="toc-C++/Qt4.5-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="目录" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="开关目录" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">开关目录</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">维基百科</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">製作機器人</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="前往另一种语言写成的文章。25种语言可用" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-25" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">25种语言</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D9%83%D9%8A%D9%81_%D8%AA%D8%B5%D9%86%D8%B9_%D8%A8%D9%88%D8%AA" title="ويكيبيديا:كيف تصنع بوت – 阿拉伯语" lang="ar" hreflang="ar" data-title="ويكيبيديا:كيف تصنع بوت" data-language-autonym="العربية" data-language-local-name="阿拉伯语" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Vikipediya:Botun_yarad%C4%B1lmas%C4%B1" title="Vikipediya:Botun yaradılması – 阿塞拜疆语" lang="az" hreflang="az" data-title="Vikipediya:Botun yaradılması" data-language-autonym="Azərbaycanca" data-language-local-name="阿塞拜疆语" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-cv mw-list-item"><a href="https://cv.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8:%C3%87%D0%B0%D0%BC%D1%80%C4%83%D0%BA_%D0%B1%D0%BE%D1%82%C3%A7%C4%83_%D0%B2%D0%B0%D0%BB%D0%BB%D0%B8_%D1%81%C4%95%D0%BD%D3%B3%D1%81%D0%B5%D0%BC" title="Википеди:Çамрăк ботçă валли сĕнӳсем – 楚瓦什语" lang="cv" hreflang="cv" data-title="Википеди:Çамрăк ботçă валли сĕнӳсем" data-language-autonym="Чӑвашла" data-language-local-name="楚瓦什语" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Help:Creating_a_bot" title="Help:Creating a bot – 英语" lang="en" hreflang="en" data-title="Help:Creating a bot" data-language-autonym="English" data-language-local-name="英语" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Ayuda:C%C3%B3mo_crear_un_bot" title="Ayuda:Cómo crear un bot – 西班牙语" lang="es" hreflang="es" data-title="Ayuda:Cómo crear un bot" data-language-autonym="Español" data-language-local-name="西班牙语" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%DB%8C%D8%A7:%DA%86%DA%AF%D9%88%D9%86%D9%87_%DB%8C%DA%A9_%D8%B1%D8%A8%D8%A7%D8%AA_%D8%A8%D8%B3%D8%A7%D8%B2%DB%8C%D9%85" title="ویکیپدیا:چگونه یک ربات بسازیم – 波斯语" lang="fa" hreflang="fa" data-title="ویکیپدیا:چگونه یک ربات بسازیم" data-language-autonym="فارسی" data-language-local-name="波斯语" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Cr%C3%A9er_un_bot" title="Wikipédia:Créer un bot – 法语" lang="fr" hreflang="fr" data-title="Wikipédia:Créer un bot" data-language-autonym="Français" data-language-local-name="法语" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Axuda:Usar_bots" title="Axuda:Usar bots – 加利西亚语" lang="gl" hreflang="gl" data-title="Axuda:Usar bots" data-language-autonym="Galego" data-language-local-name="加利西亚语" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:%E0%A4%AC%E0%A5%89%E0%A4%9F_%E0%A4%AC%E0%A4%A8%E0%A4%BE%E0%A4%A8%E0%A5%87_%E0%A4%95%E0%A5%80_%E0%A4%AA%E0%A5%8D%E0%A4%B0%E0%A4%95%E0%A5%8D%E0%A4%B0%E0%A4%BF%E0%A4%AF%E0%A4%BE" title="विकिपीडिया:बॉट बनाने की प्रक्रिया – 印地语" lang="hi" hreflang="hi" data-title="विकिपीडिया:बॉट बनाने की प्रक्रिया" data-language-autonym="हिन्दी" data-language-local-name="印地语" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/Wikipedija:Botovi/Bot" title="Wikipedija:Botovi/Bot – 克罗地亚语" lang="hr" hreflang="hr" data-title="Wikipedija:Botovi/Bot" data-language-autonym="Hrvatski" data-language-local-name="克罗地亚语" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Bantuan:Bot" title="Bantuan:Bot – 印度尼西亚语" lang="id" hreflang="id" data-title="Bantuan:Bot" data-language-autonym="Bahasa Indonesia" data-language-local-name="印度尼西亚语" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://ka.wikipedia.org/wiki/%E1%83%95%E1%83%98%E1%83%99%E1%83%98%E1%83%9E%E1%83%94%E1%83%93%E1%83%98%E1%83%90:%E1%83%91%E1%83%9D%E1%83%A2%E1%83%98%E1%83%A1_%E1%83%A8%E1%83%94%E1%83%A5%E1%83%9B%E1%83%9C%E1%83%90" title="ვიკიპედია:ბოტის შექმნა – 格鲁吉亚语" lang="ka" hreflang="ka" data-title="ვიკიპედია:ბოტის შექმნა" data-language-autonym="ქართული" data-language-local-name="格鲁吉亚语" class="interlanguage-link-target"><span>ქართული</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%8F%84%EC%9B%80%EB%A7%90:%EB%B4%87_%EB%A7%8C%EB%93%A4%EA%B8%B0" title="도움말:봇 만들기 – 韩语" lang="ko" hreflang="ko" data-title="도움말:봇 만들기" data-language-autonym="한국어" data-language-local-name="韩语" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%98%D0%B0:%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%B2%D0%B0%D1%9A%D0%B5_%D0%BD%D0%B0_%D0%B1%D0%BE%D1%82" title="Википедија:Создавање на бот – 马其顿语" lang="mk" hreflang="mk" data-title="Википедија:Создавање на бот" data-language-autonym="Македонски" data-language-local-name="马其顿语" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ps mw-list-item"><a href="https://ps.wikipedia.org/wiki/%D9%88%D9%8A%DA%A9%D9%8A%D9%BE%DB%90%DA%89%D9%8A%D8%A7:%D9%88%D9%8A%DA%A9%D9%8A_%D8%B1%D9%88%D8%A8%D8%A7%D9%BC_%DA%85%D9%86%DA%AB%D9%87_%D8%AC%D9%88%DA%93_%DA%A9%DA%93%D9%88" title="ويکيپېډيا:ويکي روباټ څنګه جوړ کړو – 普什图语" lang="ps" hreflang="ps" data-title="ويکيپېډيا:ويکي روباټ څنګه جوړ کړو" data-language-autonym="پښتو" data-language-local-name="普什图语" class="interlanguage-link-target"><span>پښتو</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Wikip%C3%A9dia:Como_criar_um_rob%C3%B4" title="Wikipédia:Como criar um robô – 葡萄牙语" lang="pt" hreflang="pt" data-title="Wikipédia:Como criar um robô" data-language-autonym="Português" data-language-local-name="葡萄牙语" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%A0%D0%B5%D0%BA%D0%BE%D0%BC%D0%B5%D0%BD%D0%B4%D0%B0%D1%86%D0%B8%D0%B8_%D1%8E%D0%BD%D0%BE%D0%BC%D1%83_%D0%B1%D0%BE%D1%82%D0%BE%D0%B2%D0%BE%D0%B4%D1%83" title="Википедия:Рекомендации юному ботоводу – 俄语" lang="ru" hreflang="ru" data-title="Википедия:Рекомендации юному ботоводу" data-language-autonym="Русский" data-language-local-name="俄语" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%98%D0%B0:%D0%9F%D1%80%D0%B0%D0%B2%D1%99%D0%B5%D1%9A%D0%B5_%D0%B1%D0%BE%D1%82%D0%B0" title="Википедија:Прављење бота – 塞尔维亚语" lang="sr" hreflang="sr" data-title="Википедија:Прављење бота" data-language-autonym="Српски / srpski" data-language-local-name="塞尔维亚语" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sv badge-Q70894304 mw-list-item" title=""><a href="https://sv.wikipedia.org/wiki/Wikipedia:Skaffa_bot" title="Wikipedia:Skaffa bot – 瑞典语" lang="sv" hreflang="sv" data-title="Wikipedia:Skaffa bot" data-language-autonym="Svenska" data-language-local-name="瑞典语" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-te mw-list-item"><a href="https://te.wikipedia.org/wiki/%E0%B0%B5%E0%B0%BF%E0%B0%95%E0%B1%80%E0%B0%AA%E0%B1%80%E0%B0%A1%E0%B0%BF%E0%B0%AF%E0%B0%BE:%E0%B0%AC%E0%B0%BE%E0%B0%9F%E0%B1%81_%E0%B0%B8%E0%B1%83%E0%B0%B7%E0%B1%8D%E0%B0%9F%E0%B0%BF%E0%B0%82%E0%B0%9A%E0%B0%A1%E0%B0%82_%E0%B0%8E%E0%B0%B2%E0%B0%BE%3F" title="వికీపీడియా:బాటు సృష్టించడం ఎలా? – 泰卢固语" lang="te" hreflang="te" data-title="వికీపీడియా:బాటు సృష్టించడం ఎలా?" data-language-autonym="తెలుగు" data-language-local-name="泰卢固语" class="interlanguage-link-target"><span>తెలుగు</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Yard%C4%B1m:Bot_olu%C5%9Fturma" title="Yardım:Bot oluşturma – 土耳其语" lang="tr" hreflang="tr" data-title="Yardım:Bot oluşturma" data-language-autonym="Türkçe" data-language-local-name="土耳其语" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-tt mw-list-item"><a href="https://tt.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%91%D0%BE%D1%82_%D1%83%D1%80%D0%BD%D0%B0%D1%88%D1%82%D1%8B%D1%80%D1%83_%D2%BB%D3%99%D0%BC_%D0%BA%D1%83%D0%BB%D0%BB%D0%B0%D0%BD%D1%83" title="Википедия:Бот урнаштыру һәм куллану – 鞑靼语" lang="tt" hreflang="tt" data-title="Википедия:Бот урнаштыру һәм куллану" data-language-autonym="Татарча / tatarça" data-language-local-name="鞑靼语" class="interlanguage-link-target"><span>Татарча / tatarça</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D9%88%DB%8C%DA%A9%DB%8C%D9%BE%DB%8C%DA%88%DB%8C%D8%A7:%D8%AA%D8%AE%D9%84%DB%8C%D9%82_%D8%B1%D9%88%D8%A8%DB%81" title="ویکیپیڈیا:تخلیق روبہ – 乌尔都语" lang="ur" hreflang="ur" data-title="ویکیپیڈیا:تخلیق روبہ" data-language-autonym="اردو" data-language-local-name="乌尔都语" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Wikipedia:T%E1%BA%A1o_bot" title="Wikipedia:Tạo bot – 越南语" lang="vi" hreflang="vi" data-title="Wikipedia:Tạo bot" data-language-autonym="Tiếng Việt" data-language-local-name="越南语" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/Help:%E6%A9%9F%E6%A2%B0%E4%BA%BA" title="Help:機械人 – 粤语" lang="yue" hreflang="yue" data-title="Help:機械人" data-language-autonym="粵語" data-language-local-name="粤语" class="interlanguage-link-target"><span>粵語</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q9384748#sitelinks-wikipedia" title="编辑跨语言链接" class="wbc-editpage">编辑链接</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="命名空间"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-project" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" title="查看维基计划页面[c]" accesskey="c"><span>项目页面</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Wikipedia_talk:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" rel="discussion" title="关于此页面的讨论[t]" accesskey="t"><span>讨论</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown " > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="更改语言变体" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">不转换</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-varlang-0" class="selected ca-variants-zh mw-list-item"><a href="/zh/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh" hreflang="zh"><span>不转换</span></a></li><li id="ca-varlang-1" class="ca-variants-zh-Hans mw-list-item"><a href="/zh-hans/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hans" hreflang="zh-Hans"><span>简体</span></a></li><li id="ca-varlang-2" class="ca-variants-zh-Hant mw-list-item"><a href="/zh-hant/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hant" hreflang="zh-Hant"><span>繁體</span></a></li><li id="ca-varlang-3" class="ca-variants-zh-Hans-CN mw-list-item"><a href="/zh-cn/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hans-CN" hreflang="zh-Hans-CN"><span>大陆简体</span></a></li><li id="ca-varlang-4" class="ca-variants-zh-Hant-HK mw-list-item"><a href="/zh-hk/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hant-HK" hreflang="zh-Hant-HK"><span>香港繁體</span></a></li><li id="ca-varlang-5" class="ca-variants-zh-Hant-MO mw-list-item"><a href="/zh-mo/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hant-MO" hreflang="zh-Hant-MO"><span>澳門繁體</span></a></li><li id="ca-varlang-6" class="ca-variants-zh-Hans-MY mw-list-item"><a href="/zh-my/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hans-MY" hreflang="zh-Hans-MY"><span>大马简体</span></a></li><li id="ca-varlang-7" class="ca-variants-zh-Hans-SG mw-list-item"><a href="/zh-sg/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hans-SG" hreflang="zh-Hans-SG"><span>新加坡简体</span></a></li><li id="ca-varlang-8" class="ca-variants-zh-Hant-TW mw-list-item"><a href="/zh-tw/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" lang="zh-Hant-TW" hreflang="zh-Hant-TW"><span>臺灣正體</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="查看"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"><span>阅读</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit" title="编辑该页面[e]" accesskey="e"><span>编辑</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=history" title="本页面的早前版本。[h]" accesskey="h"><span>查看历史</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="页面工具"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="工具" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">工具</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">工具</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">隐藏</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="更多选项" > <div class="vector-menu-heading"> 操作 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA"><span>阅读</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit" title="编辑该页面[e]" accesskey="e"><span>编辑</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=history"><span>查看历史</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> 常规 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:%E9%93%BE%E5%85%A5%E9%A1%B5%E9%9D%A2/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" title="列出所有与本页相链的页面[j]" accesskey="j"><span>链入页面</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:%E9%93%BE%E5%87%BA%E6%9B%B4%E6%94%B9/Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" rel="nofollow" title="页面链出所有页面的更改[k]" accesskey="k"><span>相关更改</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Project:%E4%B8%8A%E4%BC%A0" title="上传图像或多媒体文件[u]" accesskey="u"><span>上传文件</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:%E7%89%B9%E6%AE%8A%E9%A1%B5%E9%9D%A2" title="全部特殊页面的列表[q]" accesskey="q"><span>特殊页面</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&oldid=75667260" title="此页面该修订版本的固定链接"><span>固定链接</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=info" title="关于此页面的更多信息"><span>页面信息</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:URL%E7%BC%A9%E7%9F%AD%E7%A8%8B%E5%BA%8F&url=https%3A%2F%2Fzh.wikipedia.org%2Fwiki%2FWikipedia%3A%25E8%25A3%25BD%25E4%25BD%259C%25E6%25A9%259F%25E5%2599%25A8%25E4%25BA%25BA"><span>获取短链接</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fzh.wikipedia.org%2Fwiki%2FWikipedia%3A%25E8%25A3%25BD%25E4%25BD%259C%25E6%25A9%259F%25E5%2599%25A8%25E4%25BA%25BA"><span>下载二维码</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> 打印/导出 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Wikipedia%3A%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=show-download-screen"><span>下载为PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="本页面的可打印版本[p]" accesskey="p"><span>打印页面</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> 在其他项目中 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Help:Bots" hreflang="en"><span>维基共享资源</span></a></li><li class="wb-otherproject-link wb-otherproject-mediawiki mw-list-item"><a href="https://www.mediawiki.org/wiki/Help:Bots" hreflang="en"><span>MediaWiki</span></a></li><li class="wb-otherproject-link wb-otherproject-wikidata mw-list-item"><a href="https://www.wikidata.org/wiki/Wikidata:Creating_a_bot" hreflang="en"><span>维基数据</span></a></li><li class="wb-otherproject-link wb-otherproject-wikivoyage mw-list-item"><a href="https://zh.wikivoyage.org/wiki/Wikivoyage:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA" hreflang="zh"><span>维基导游</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q9384748" title="链接到连接的数据仓库项目[g]" accesskey="g"><span>维基数据项目</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="页面工具"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="外观"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">外观</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">移至侧栏</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">隐藏</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> <div id="mw-indicator-noteTA-f3e2a619" class="mw-indicator"><div class="mw-parser-output"><span class="skin-invert" typeof="mw:File"><span title="本页使用了标题或全文手工转换"><img alt="本页使用了标题或全文手工转换" src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/35px-Zh_conversion_icon_m.svg.png" decoding="async" width="35" height="22" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/53px-Zh_conversion_icon_m.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Zh_conversion_icon_m.svg/70px-Zh_conversion_icon_m.svg.png 2x" data-file-width="32" data-file-height="20" /></span></span></div></div> </div> <div id="siteSub" class="noprint">维基百科,自由的百科全书</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="zh" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r85100532">.mw-parser-output .hatnote{font-size:small}.mw-parser-output div.hatnote{padding-left:2em;margin-bottom:0.8em;margin-top:0.8em}.mw-parser-output .hatnote-notice-img::after{content:"\202f \202f \202f \202f "}.mw-parser-output .hatnote-notice-img-small::after{content:"\202f \202f "}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}body.skin-minerva .mw-parser-output .hatnote-notice-img,body.skin-minerva .mw-parser-output .hatnote-notice-img-small{display:none}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable"><span class="noviewer hatnote-notice-img" typeof="mw:File"><a href="/wiki/Wikipedia:%E6%B6%88%E6%AD%A7%E4%B9%89" title="Wikipedia:消歧义"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Confusion_grey.svg/24px-Confusion_grey.svg.png" decoding="async" width="24" height="18" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Confusion_grey.svg/36px-Confusion_grey.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Confusion_grey.svg/48px-Confusion_grey.svg.png 2x" data-file-width="260" data-file-height="200"/></a></span><b>提示</b>:此项目页的主题不是<b><a href="/wiki/%E6%A9%9F%E5%99%A8%E4%BA%BA" class="mw-redirect" title="機器人">機器人</a></b>。</div> <div id="noteTA-f3e2a619" class="noteTA"><div class="noteTA-group"><div data-noteta-group-source="module" data-noteta-group="IT"></div></div></div> <table class="plainlinks ombox ombox-notice noprint" role="presentation"><tbody><tr><td class="mbox-empty-cell"></td><td class="mbox-text" style="text-align:center; margin:1em 0em;"><style data-mw-deduplicate="TemplateStyles:r84265675">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:" :"}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist-pipe dd::after,.mw-parser-output .hlist-pipe li::after{content:" | ";font-weight:normal}.mw-parser-output .hlist-hyphen dd::after,.mw-parser-output .hlist-hyphen li::after{content:" - ";font-weight:normal}.mw-parser-output .hlist-comma dd::after,.mw-parser-output .hlist-comma li::after{content:"、";font-weight:normal}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:"("counter(listitem)"\a0 "}.mw-parser-output ul.cslist,.mw-parser-output ul.sslist{margin:0;padding:0;display:inline-block;list-style:none}.mw-parser-output .cslist li,.mw-parser-output .sslist li{margin:0;display:inline-block}.mw-parser-output .cslist li::after{content:","}.mw-parser-output .sslist li::after{content:";"}.mw-parser-output .cslist li:last-child::after,.mw-parser-output .sslist li:last-child::after{content:none}</style><div class="hlist" style="margin-left: 0em;"> <ul><li><b><a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA" title="Wikipedia:机器人">機器人概述</a></b> <ul><li><a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%A7%8D%E7%B1%BB" title="Wikipedia:机器人种类">種類</a></li></ul></li> <li><b><a href="/wiki/Wikipedia:%E6%A9%9F%E6%A2%B0%E4%BA%BA%E6%96%B9%E9%87%9D" title="Wikipedia:機械人方針">機械人方針</a></b></li> <li><b><a href="/wiki/Wikipedia:%E6%A9%9F%E6%A2%B0%E4%BA%BA%E5%AF%A9%E6%A0%B8%E5%B0%8F%E7%B5%84" title="Wikipedia:機械人審核小組">機械人審核小組</a></b> <ul><li><a href="/wiki/Wikipedia:%E6%A9%9F%E6%A2%B0%E4%BA%BA%E5%AF%A9%E6%A0%B8%E5%B0%8F%E7%B5%84/%E6%8C%87%E5%8D%97" title="Wikipedia:機械人審核小組/指南">指南</a></li> <li><a href="/wiki/Template:BAG_Tools" title="Template:BAG Tools">行政用模板</a></li></ul></li> <li><style data-mw-deduplicate="TemplateStyles:r83933911">@media screen{html.skin-theme-clientpref-night .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-night .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output p>.tmp-color,html.skin-theme-clientpref-os .mw-parser-output table:not(.notheme) .tmp-color{color:inherit!important}}</style><span class="tmp-color" style="color:grey">機器人布告板</span></li></ul> </div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r84265675"><div class="hlist" style="margin-left: 0em;"> <ul><li><a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E7%94%B3%E8%AF%B7" title="Wikipedia:机器人/申请">机器人作业申请</a></li> <li><a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E4%BD%9C%E4%B8%9A%E8%AF%B7%E6%B1%82" title="Wikipedia:机器人/作业请求">請求机器人幫助作業</a></li> <li><a href="/wiki/Special:%E7%94%A8%E6%88%B7%E5%88%97%E8%A1%A8/bot" title="Special:用户列表/bot">機器人列表</a></li> <li><a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E5%88%97%E8%A1%A8" title="Wikipedia:机器人/列表">已批准任務</a></li> <li><a class="mw-selflink selflink">製作機器人</a></li></ul> </div></td><td class="mbox-imageright"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/3/35/Crystal_Clear_action_run.svg/50px-Crystal_Clear_action_run.svg.png" decoding="async" width="50" height="45" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/35/Crystal_Clear_action_run.svg/75px-Crystal_Clear_action_run.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/35/Crystal_Clear_action_run.svg/100px-Crystal_Clear_action_run.svg.png 2x" data-file-width="140" data-file-height="127"/></span></span></td></tr></tbody></table> <style data-mw-deduplicate="TemplateStyles:r83102931">.mw-parser-output .shortcutbox{float:right;border:1px solid #aaa;background-color:var(--background-color-base,#fff);margin:0 0 0 1em;padding:.3em .6em .2em .6em;text-align:center;font-size:85%;font-weight:bold;white-space:nowrap}.mw-parser-output .shortcutbox-left{float:left}.mw-parser-output .shortcutbox-ombox{float:right;border-left:1px solid #aaa;padding:.4em 0em .4em 1em;text-align:center;line-height:1.4em;font-weight:bold;font-size:smaller;white-space:nowrap}.mw-parser-output .shortcutlist{display:inline-block;border-bottom:1px solid #aaa;margin-bottom:.2em;font-weight:normal}.mw-parser-output .shortcut-anchordiv{position:relative;top:-3em}.mw-parser-output .module-shortcutboxplain{float:right;border:1px solid #aaa;background-color:var(--background-color-base,#fff);margin:0 0 0 1em;padding:.3em .6em .2em .6em;text-align:center;font-size:85%;font-weight:bold;white-space:nowrap}.mw-parser-output .module-shortcutboxplain-left{float:left}.mw-parser-output .module-omboxshortcutplain{float:right;border-left:1px solid #aaa;padding:.4em 0em .4em 1em;text-align:center;line-height:1.4em;font-weight:bold;font-size:smaller;white-space:nowrap}.mw-parser-output .module-shortcutlist{display:inline-block;border-bottom:1px solid #aaa;margin-bottom:.2em;font-weight:normal}.mw-parser-output .module-shortcutanchordiv{position:relative;top:-3em}</style><div class="module-shortcutanchordiv"><span id="WP:CREATEBOT"></span><span id="WP:MKBOT"></span></div><div class="module-shortcutboxplain plainlist noprint" role="note"><div class="module-shortcutlist"><a href="/wiki/Wikipedia:%E6%8D%B7%E5%BE%91" title="Wikipedia:捷徑">快捷方式</a></div><ul><li><span class="plainlinks"><a class="external text" href="https://zh.wikipedia.org/w/index.php?title=Wikipedia:CREATEBOT&redirect=no">WP:CREATEBOT</a></span></li><li><span class="plainlinks"><a class="external text" href="https://zh.wikipedia.org/w/index.php?title=Wikipedia:MKBOT&redirect=no">WP:MKBOT</a></span></li></ul></div> <p><b>机器人</b>是一种与维基百科互动的自动程序,就好像他们是人类编辑者一样。这个页面将解释如何制作一个用于维基百科的机器人。此页面主要适用于那些拥有编程经验,但不知道如何使用它们来创建维基机器人的用户。 </p> <meta property="mw:PageProp/toc"/> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="为何需要机器人?" data-mw-thread-id="h-为何需要机器人?"><span id=".E4.B8.BA.E4.BD.95.E9.9C.80.E8.A6.81.E6.9C.BA.E5.99.A8.E4.BA.BA.EF.BC.9F"></span><span data-mw-comment-start="" id="h-为何需要机器人?"></span>为何需要机器人?<span data-mw-comment-end="h-为何需要机器人?"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=1" title="编辑章节:为何需要机器人?"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u4e3a\u4f55\u9700\u8981\u673a\u5668\u4eba\uff1f","replies":[]}}--></div> <p>机器人以比人类快得多的速度执行任务。如果你需要完成一些简单但冗长的工作(比如当你需要添加<a href="/wiki/Help:%E6%A8%A1%E6%9D%BF" title="Help:模板">模板</a>到某个类别的1000多个條目里时),那么这种工作更适合让机器人而不是人类来进行。 </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="製作机器人前先仔细想好" data-mw-thread-id="h-製作机器人前先仔细想好"><span id=".E8.A3.BD.E4.BD.9C.E6.9C.BA.E5.99.A8.E4.BA.BA.E5.89.8D.E5.85.88.E4.BB.94.E7.BB.86.E6.83.B3.E5.A5.BD"></span><span data-mw-comment-start="" id="h-製作机器人前先仔细想好"></span>製作机器人前先仔细想好<span data-mw-comment-end="h-製作机器人前先仔细想好"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=2" title="编辑章节:製作机器人前先仔细想好"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u88fd\u4f5c\u673a\u5668\u4eba\u524d\u5148\u4ed4\u7ec6\u60f3\u597d","replies":[]}}--></div> <p>维基百科中<a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E5%88%97%E8%A1%A8" title="Wikipedia:机器人/列表">已经有一些机器人正在运行</a>。其中许多机器人开放了<a href="/wiki/%E6%BA%90%E4%BB%A3%E7%A0%81" title="源代码">源代码</a>,以便于在某些情况下使用这些源代码缩短新机器人的开发时间。另外,维基百科还有对所有用户开放使用的一些<span class="ilh-all" data-orig-title="维基半机器人" data-lang-code="en" data-lang-name="英语" data-foreign-title="Wikipedia:Semi-bots"><span class="ilh-page"><a href="/w/index.php?title=%E7%BB%B4%E5%9F%BA%E5%8D%8A%E6%9C%BA%E5%99%A8%E4%BA%BA&action=edit&redlink=1" class="new" title="维基半机器人(页面不存在)">半机器人</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/Wikipedia:Semi-bots" class="extiw" title="en:Wikipedia:Semi-bots"><span lang="en" dir="auto">Wikipedia:Semi-bots</span></a></span>)</span></span>。它们之中的大多数是拥有维基相关特殊功能的加强浏览器。其中最常使用的便是<a href="/wiki/Wikipedia:AutoWikiBrowser" title="Wikipedia:AutoWikiBrowser">自动维基浏览器</a>。请参见<a href="/wiki/Wikipedia:%E7%BB%B4%E5%9F%BA%E7%99%BE%E7%A7%91%E5%B7%A5%E5%85%B7" title="Wikipedia:维基百科工具">维基百科:维基百科工具</a>以获得完整列表。 </p><p>如果你没有先前的编程经验,更简单的办法是请求一个已有的机器人来完成你的工作,或者请求其他人为你编写一个机器人。这类请求可以在<a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E4%BD%9C%E4%B8%9A%E8%AF%B7%E6%B1%82" title="Wikipedia:机器人/作业请求">Wikipedia:机器人/作业请求</a>中提出。如果你一定要自己编写一个机器人,一定记住学习一门程序语言并不是一个简单的任务。无论如何,这并不是黑魔法-只要花费足够的时间和努力,任何人都可以学会如何编程,祝你好运! </p><p>如果你决定去创建一个机器人,那么创建一个无错误、高效且有用的机器人是非常重要的。下面的初步考虑是重要的: </p> <ul><li>这个机器人将会是人工辅助的还是全自动的?</li> <li>你会独自一个人创建一个机器人,还是利用其他编程者的帮助?</li> <li>你将使用什么程序语言来开发这个机器人?</li> <li>这个机器人的请求,编辑,或是其它行为会不会被记录?如果是,那么这些记录是存储在本地,还是维基页面上?</li> <li>这个机器人是运行于浏览器之中(比如,用JavaScript编写),或者是一个独立的程序?</li> <li>如果是一个独立程序,这个机器人将会在你的电脑本地运行,还是在一个类似<a rel="nofollow" class="external text" href="https://wiki.toolserver.org/view/Main_Page">维基媒体工具服务器</a>的远程服务器上运行?</li> <li>如果是在远程服务器上运行,其他的编者是否能启动或操作这个机器人?</li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="维基机器人的工作原理" data-mw-thread-id="h-维基机器人的工作原理"><span id=".E7.BB.B4.E5.9F.BA.E6.9C.BA.E5.99.A8.E4.BA.BA.E7.9A.84.E5.B7.A5.E4.BD.9C.E5.8E.9F.E7.90.86"></span><span data-mw-comment-start="" id="h-维基机器人的工作原理"></span>维基机器人的工作原理<span data-mw-comment-end="h-维基机器人的工作原理"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=3" title="编辑章节:维基机器人的工作原理"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u7ef4\u57fa\u673a\u5668\u4eba\u7684\u5de5\u4f5c\u539f\u7406","replies":["h-\u6982\u8bba-\u7ef4\u57fa\u673a\u5668\u4eba\u7684\u5de5\u4f5c\u539f\u7406","h-\u7528API\u5beb\u673a\u5668\u4eba-\u7ef4\u57fa\u673a\u5668\u4eba\u7684\u5de5\u4f5c\u539f\u7406","h-\u767b\u5165\/\u5efa\u7acb\u65b0\u5e33\u865f-\u7ef4\u57fa\u673a\u5668\u4eba\u7684\u5de5\u4f5c\u539f\u7406","h-\u7f16\u8f91\uff1b\u7f16\u8f91\u4ee4\u724c-\u7ef4\u57fa\u673a\u5668\u4eba\u7684\u5de5\u4f5c\u539f\u7406","h-\u7f16\u8f91\u51b2\u7a81-\u7ef4\u57fa\u673a\u5668\u4eba\u7684\u5de5\u4f5c\u539f\u7406"]}}--></div> <div class="mw-heading mw-heading3"><h3 id="概论" data-mw-thread-id="h-概论-维基机器人的工作原理"><span id=".E6.A6.82.E8.AE.BA"></span><span data-mw-comment-start="" id="h-概论-维基机器人的工作原理"></span>概论<span data-mw-comment-end="h-概论-维基机器人的工作原理"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=4" title="编辑章节:概论"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-halign-right" typeof="mw:File"><a href="/wiki/File:Wikieditcycle.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Wikieditcycle.svg/229px-Wikieditcycle.svg.png" decoding="async" width="229" height="190" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Wikieditcycle.svg/344px-Wikieditcycle.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Wikieditcycle.svg/458px-Wikieditcycle.svg.png 2x" data-file-width="626" data-file-height="519"/></a><figcaption></figcaption></figure> <p>就像人类编辑者一样,一个维基百科机器人阅读维基百科上的页面,对它认为需要做出变化的地方进行改变。不同之处在于尽管机器人更快并且不会像人类一样容易疲倦,他们并不像我们一样聪明。机器人适用于固定模式的、不需作出决策的重复工作。 </p><p>在最典型的情况下,机器人登入它自己的帐号并像一个浏览器一样请求维基百科的页面。它不会在显示屏上显示页面,而是在内存中工作。接下来它会程序化地分析页面代码以确定是否需要作出改变。然后它会再次像一个浏览器一样做出它被设计做出的改动并提交更改。 </p><p>因为机器人以与普通人相同的方式访问页面,它们会体验到和人类用户一样的困难。他们会卷入编辑冲突,遇到页面延迟,或者遇到其它请求或编辑页面时可能遇到的并发错误。因为机器人的工作量远远大于一个普通的人,它们更容易遇到这些问题。因此,当编写一个机器人时,对这些情况的考虑是必要的。 </p> <div class="mw-heading mw-heading3"><h3 id="用API寫机器人" data-mw-thread-id="h-用API寫机器人-维基机器人的工作原理"><span id=".E7.94.A8API.E5.AF.AB.E6.9C.BA.E5.99.A8.E4.BA.BA"></span><span data-mw-comment-start="" id="h-用API寫机器人-维基机器人的工作原理"></span>用API寫机器人<span data-mw-comment-end="h-用API寫机器人-维基机器人的工作原理"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=5" title="编辑章节:用API寫机器人"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>为了对维基百科页面作出更改,机器人有必要从维基百科检索页面并且提交编辑。一些<a href="/wiki/%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%8E%A5%E5%8F%A3" title="应用程序接口">应用程序接口</a>可以被用于这个目的。 </p> <ul><li><a href="https://www.mediawiki.org/wiki/API" class="extiw" title="mw:API">MediaWiki APIs</a> (api.php)。该库用于制作自动处理查询和提交更改的机器人。可以接受多种机器可读的格式如<a href="/wiki/JSON" title="JSON">JSON</a>、<a href="/wiki/XML" title="XML">XML</a>、<a href="/wiki/YAML" title="YAML">YAML</a>等。其特性在旧版的查询API接口可以找到,参见<a href="https://www.mediawiki.org/wiki/API" class="extiw" title="mw:API">API手册</a>。</li></ul> <dl><dd><b>状态:</b>在所有维基媒体项目中可用,包含很全的查询集。通过api.php编辑页面适用于所有维基媒体项目,这允许机器人在没有<span class="ilh-all" data-orig-title="屏幕抓取" data-lang-code="en" data-lang-name="英语" data-foreign-title="Screen scraping"><span class="ilh-page"><a href="/w/index.php?title=%E5%B1%8F%E5%B9%95%E6%8A%93%E5%8F%96&action=edit&redlink=1" class="new" title="屏幕抓取(页面不存在)">屏幕抓取</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/Screen_scraping" class="extiw" title="en:Screen scraping"><span lang="en" dir="auto">Screen scraping</span></a></span>)</span></span>的情况下工作。</dd></dl> <ul><li><span class="ilh-all" data-orig-title="屏幕抓取" data-lang-code="en" data-lang-name="英语" data-foreign-title="Screen scraping"><span class="ilh-page"><a href="/w/index.php?title=%E5%B1%8F%E5%B9%95%E6%8A%93%E5%8F%96&action=edit&redlink=1" class="new" title="屏幕抓取(页面不存在)">屏幕抓取</a></span><span class="noprint ilh-comment">(<span class="ilh-lang">英语</span><span class="ilh-colon">:</span><span class="ilh-link"><a href="https://en.wikipedia.org/wiki/Screen_scraping" class="extiw" title="en:Screen scraping"><span lang="en" dir="auto">Screen scraping</span></a></span>)</span></span> (index.php)。屏幕抓取用于请求维基页面,查看HTML源代码(和你在大多数浏览器中点击查看-页面源代码所看到的一样),之后分析HTML的特性。许多问题可能会在其中发生:维基百科界面可以在毫无提示的情况下改变,这可能会破坏机器人的代码,获取HTML的请求对处理维基文本本身对服务器的压力也更大。当你请求一个页面的精简版本(无维基侧边栏和标签栏)以减少数据传输并减小用户界面更改的影响时,你可以包含代码<code>action=render</code> GET请求 w/index.php?title=Wikipedia:...&action=render 。index.php的其他参数也可能会有帮助:参见列表<a href="https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php" class="extiw" title="mw:Manual:Parameters to index.php">index.php参数手册</a>。在API有如此多特性的情况下,几乎没有理由再使用这种技术了,这种技术主要用于较古老的机器人框架。</li></ul> <dl><dd><b>状态:</b> 不鼓励使用。</dd></dl> <ul><li><a href="/wiki/Special:%E5%AF%BC%E5%87%BA%E9%A1%B5%E9%9D%A2" title="Special:导出页面">Special:Export</a>可以以XML格式获取大多数的页面内容。术语参见<a href="https://www.mediawiki.org/wiki/Manual:Parameters_to_Special:Export" class="extiw" title="mw:Manual:Parameters to Special:Export">Special:Export参数手册</a>。</li></ul> <dl><dd><b>状态:</b> MediaWiki的内置特性,在所有维基媒体服务器上均能使用。</dd></dl> <ul><li>原生(维基文本)页面处理。使用<code>action=raw</code>或<code>action=raw&templates=expand</code> GET请求到index.php可以获取一个页面未处理过的维基文本源码。带有<code>prop=revisions&rvprop=content</code>或<code>prop=revisions&rvprop=content&rvexpandtemplates=1</code>的API查询也大致做类似的工作,同时允许检索一些附加信息。</li></ul> <dl><dd><b>状态:</b> MediaWiki的内置特性,在所有维基媒体服务器上均能使用。</dd></dl> <p>一些维基百科服务器为大规模数据获取配置了压缩(<a href="/wiki/Gzip" title="Gzip">gzip</a>内容。这可以通过在HTTP请求头里加上一行"Accept-Encoding: gzip"来获得。如果HTTP回报头包含"Content-Encoding: gzip"就表明文档是gzip格式的,否则为普通的未压缩格式。注意这些特性仅仅是对于特定的服务器而配置的,并不是MediaWiki软件的特性。其他部署MediaWiki的网站可能没有此特性。 </p> <div class="mw-heading mw-heading3"><h3 id="登入/建立新帳號" data-mw-thread-id="h-登入/建立新帳號-维基机器人的工作原理"><span id=".E7.99.BB.E5.85.A5.2F.E5.BB.BA.E7.AB.8B.E6.96.B0.E5.B8.B3.E8.99.9F"></span><span data-mw-comment-start="" id="h-登入/建立新帳號-维基机器人的工作原理"></span>登入/建立新帳號<span data-mw-comment-end="h-登入/建立新帳號-维基机器人的工作原理"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=6" title="编辑章节:登入/建立新帳號"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>被认可的机器人需要登录以作出编辑。尽管机器人可以在没有登录的情况下作出读取请求,完成测试的机器人还是应该登录以进行所有活动。登录拥有机器人标签的账号的机器人可以在每次对Mediawiki API(api.php)请求时获得更多结果。大多数机器人程序框架应该自动处理登录以及Cookies,但是如果你没有使用一个存在的框架,你需要进行以下步骤。 </p><p>为了安全起见,登录数据必须使用<a href="/wiki/%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE#请求方法" title="超文本传输协议">HTTP POST</a>方式传送。因为<a href="/wiki/%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE#请求方法" title="超文本传输协议">HTTP GET</a>请求的参数在URL中很容易看见,通过GET登录是禁止的。 </p><p>为了使用<a href="https://www.mediawiki.org/wiki/API" class="extiw" title="mw:API">MediaWiki API</a>登录一个机器人,需要两个POST请求: </p> <div style="width:50%; float:left;"> <p><strong>请求1</strong> </p> <ul><li>URL:<code><a class="external free" href="https://zh.wikipedia.org/w/api.php?action=login&format=xml">https://zh.wikipedia.org/w/api.php?action=login&format=xml</a></code></li> <li>POST参数: <ul><li><code>lgname=BOTUSERNAME</code></li> <li><code>lgpassword=BOTPASSWORD</code></li></ul></li></ul> <p>如果密码正确,会返回一个“NeedToken”的结果和一个XML格式的“标记”参数,参见文档<a href="https://www.mediawiki.org/wiki/API:Login" class="extiw" title="mw:API:Login">mw:API:Login</a>。其他输出格式是可用的。它也会返回如下所示的HTTP Cookie。 </p> </div> <div style="width:50%; float:left;"> <p><strong>请求2</strong> </p> <ul><li>URL:<code><a class="external free" href="https://zh.wikipedia.org/w/api.php?action=login&format=xml">https://zh.wikipedia.org/w/api.php?action=login&format=xml</a></code></li> <li>POST参数: <ul><li><code>lgname=BOTUSERNAME</code></li> <li><code>lgpassword=BOTPASSWORD</code></li> <li><code>lgtoken=TOKEN</code></li></ul></li></ul> <p>其中TOKEN是上一步结果获得的令牌。上一步请求获得的HTTP cookies必须与第二个请求一起传入。 </p> </div> <p>BOTPASSWORD是使用<a href="/wiki/Special:%E6%9C%BA%E5%99%A8%E4%BA%BA%E5%AF%86%E7%A0%81" title="Special:机器人密码">Special:BotPasswords</a>取得的密碼,而不是登入帳號取得的密碼。 </p><p>一个成功的登录尝试会从维基媒体服务器得到几个<a href="/wiki/Cookie" title="Cookie">HTTP cookie</a>。机器人必须正确处理这些cookies并且在每次请求时发送回去(在编辑时更加重要)。在中文维基百科里会使用以下cookies:<b>zhwikiUserID</b>、<b>zhwikiToken</b>和<b>zhwikiUserName</b>。<b>zhwikisession</b>缓存在发送或确认编辑时需要,否则会返回<a href="/wiki/MediaWiki:Session_fail_preview" title="MediaWiki:Session fail preview">一个错误信息</a>。 </p> <div class="mw-heading mw-heading3"><h3 id="编辑;编辑令牌" data-mw-thread-id="h-编辑;编辑令牌-维基机器人的工作原理"><span id=".E7.BC.96.E8.BE.91.EF.BC.9B.E7.BC.96.E8.BE.91.E4.BB.A4.E7.89.8C"></span><span data-mw-comment-start="" id="h-编辑;编辑令牌-维基机器人的工作原理"></span>编辑;编辑令牌<span data-mw-comment-end="h-编辑;编辑令牌-维基机器人的工作原理"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=7" title="编辑章节:编辑;编辑令牌"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>在编辑维基百科的页面时,需使用<a href="https://www.mediawiki.org/wiki/Manual:Edit_token" class="extiw" title="mw:Manual:Edit token">编辑令牌</a>系统。这个令牌看上去像一个末尾有“+\”的长十六进制数,例如:<br/> </p> <dl><dd><b>d41d8cd98f00b204e9800998ecf8427e+\</b><br/></dd></dl> <p>编辑令牌的作用是防止“编辑劫持”(这种情况下,编辑者无意点击某链接就可能产生编辑操作) </p><p>编辑过程涉及到两个HTTP请求。第一步请求一个编辑令牌,第二步把要编辑页面的新内容和刚才获得的编辑令牌放在一起进行POST请求。<style data-mw-deduplicate="TemplateStyles:r83946278">.mw-parser-output .template-facttext{background-color:var(--background-color-neutral,#eaecf0);color:inherit;margin:-.3em 0;padding:.3em 0}</style><mark class="template-facttext" title="需要提供文献来源">每次登录后编辑令牌都不会改变,因此第一步每次登录只需做一次。</mark><sup class="noprint Template-Fact"><a href="/wiki/Wikipedia:%E5%88%97%E6%98%8E%E6%9D%A5%E6%BA%90" title="Wikipedia:列明来源"><span style="white-space: nowrap;" title="来源请求。">[來源請求]</span></a></sup> </p><p>要获得一个编辑令牌,请按照下列步骤做: </p> <ul> <li>用以下参数向<b>MediaWiki API (api.php)</b>发出POST请求(参见 <a href="https://www.mediawiki.org/wiki/API:Edit" class="extiw" title="mw:API:Edit">mw:API:Edit</a>): <ul> <li><code>action=query</code></li> <li><code>meta=tokens</code></li> <li><code>type=csrf</code></li> </ul> <p>令牌一定会在返回值的<code>csrftoken</code>属性中。 </p> </li> </ul> <p>如果机器人获取到的编辑令牌没有上述的十六位字符串(如编辑令牌只有'+\'),则说明机器人很可能没有成功登录。这可能有多种原因:服务器端身份验证失败、连接断开或超时、cookies存储/返回错误。如果这不是因为机器人程序错误,再次登录以刷新登录缓存即可。机器人可以使用<a href="https://www.mediawiki.org/wiki/API:Assert" class="extiw" title="mw:API:Assert">Assert Api</a>来确认其已经登录。 </p> <div class="mw-heading mw-heading3"><h3 id="编辑冲突" data-mw-thread-id="h-编辑冲突-维基机器人的工作原理"><span id=".E7.BC.96.E8.BE.91.E5.86.B2.E7.AA.81"></span><span data-mw-comment-start="" id="h-编辑冲突-维基机器人的工作原理"></span>编辑冲突<span data-mw-comment-end="h-编辑冲突-维基机器人的工作原理"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=8" title="编辑章节:编辑冲突"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>当多人同时尝试编辑一个页面时会发生编辑冲突。几乎每个机器人都会遇到各种各样的编辑冲突,因此制作机器人时应当包括处理编辑冲突的机制。 </p><p>使用Mediawiki API(api.php)的机器人在读取页面准备编辑前,应当重新获取编辑令牌以及<code>starttimestamp</code>(开始时间戳)和上一个版本的时间戳。可以使用<code>prop=info|revisions</code>在一次查询中同时获取令牌和页面的内容(<span class="plainlinks"><a class="external text" href="https://en.wikipedia.org/w/api.php?action=query&titles=Wikipedia:Sandbox&prop=info%7Crevisions&inprop=&intoken=edit&rvprop=timestamp%7Ccontent">example</a></span>)。当提交编辑时,设置<code>starttimestamp</code>和<code>basetimestamp</code>属性,并检查服务器回应是否有错误信息。更多的细节,请参见<a href="https://www.mediawiki.org/wiki/API:Edit_-_Create%26Edit_pages" class="extiw" title="mw:API:Edit - Create&Edit pages">mw:API:Edit - Create&Edit pages</a>。 </p><p>总的来说,如果一次编辑没有完成,机器人应当在做新编辑前再次检查页面,以确定编辑仍然是正确的。进一步说,如果机器人重新检查并提交编辑,它必须足够小心以避免可能导致的无限循环甚至<a href="/wiki/Wikipedia:%E7%BC%96%E8%BE%91%E6%88%98" class="mw-redirect" title="Wikipedia:编辑战">编辑战</a>。 </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="机器人制作过程概览" data-mw-thread-id="h-机器人制作过程概览"><span id=".E6.9C.BA.E5.99.A8.E4.BA.BA.E5.88.B6.E4.BD.9C.E8.BF.87.E7.A8.8B.E6.A6.82.E8.A7.88"></span><span data-mw-comment-start="" id="h-机器人制作过程概览"></span>机器人制作过程概览<span data-mw-comment-end="h-机器人制作过程概览"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=9" title="编辑章节:机器人制作过程概览"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","replies":["h-\u6784\u601d-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u7ec6\u5316-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u8f6f\u4ef6\u67b6\u6784-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u5b9e\u73b0-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u6d4b\u8bd5-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u6587\u6863-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u8be2\u95ee\u548c\u62b1\u6028-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8","h-\u7ef4\u62a4-\u673a\u5668\u4eba\u5236\u4f5c\u8fc7\u7a0b\u6982\u89c8"]}}--></div> <p>实际上,撰写机器人代码只是制作维基百科机器人工作的一部分。机器人操作者应该大致仿照以下开发步骤以保证机器人遵循<a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA" title="Wikipedia:机器人">维基百科的机器人方针</a>。违背方针的机器人无法得到审批,严重者甚至会被封禁。 </p> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Bot_development_cycle.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/5/51/Bot_development_cycle.svg/500px-Bot_development_cycle.svg.png" decoding="async" width="500" height="448" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/51/Bot_development_cycle.svg/750px-Bot_development_cycle.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/5/51/Bot_development_cycle.svg/1000px-Bot_development_cycle.svg.png 2x" data-file-width="580" data-file-height="520"/></a><figcaption>维基百科机器人开发流程概览</figcaption></figure> <div class="mw-heading mw-heading4"><h4 id="构思" data-mw-thread-id="h-构思-机器人制作过程概览"><span id=".E6.9E.84.E6.80.9D"></span><span data-mw-comment-start="" id="h-构思-机器人制作过程概览"></span>构思<span data-mw-comment-end="h-构思-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=10" title="编辑章节:构思"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>制作维基百科机器人首先要听取请求或自己有想法。如果你不知道该写一个怎么样的机器人,你可以完成<a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E4%BD%9C%E4%B8%9A%E8%AF%B7%E6%B1%82" title="Wikipedia:机器人/作业请求">其他用户请求机器人完成的工作</a>。</li> <li>确认没有其他机器人已经在进行你设想的机器人的工作。想知道机器人正在完成哪些任务,请参见<a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E5%88%97%E8%A1%A8" title="Wikipedia:机器人/列表">正在运行的机器人列表</a>。</li></ul> <div class="mw-heading mw-heading4"><h4 id="细化" data-mw-thread-id="h-细化-机器人制作过程概览"><span id=".E7.BB.86.E5.8C.96"></span><span data-mw-comment-start="" id="h-细化-机器人制作过程概览"></span>细化<span data-mw-comment-end="h-细化-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=11" title="编辑章节:细化"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>精确地(可能用一种非常严格的方式)描述你要写的软件有什么任务要做。你应该详尽地提出它要做什么事。尝试和其他的编辑者讨论这个提议,并基于其他人的反馈来进行改进。即使是一个很伟大的想法,也能通过综合其他编辑者的想法而变得更好。</li> <li>在最基本的情况下,经过你细化之后的机器人必须符合下列标准:</li></ul> <dl><dd><ul><li>无害(机器人的编辑不能对维基百科的平稳运行造成破坏)</li> <li>有用(机器人能够比人工编辑更有效率,提供有用的服务)</li> <li>不浪费服务器资源</li> <li>遵守<a href="/wiki/Template:Bots" title="Template:Bots">模板:Bots</a></li></ul></dd></dl> <div class="mw-heading mw-heading4"><h4 id="软件架构" data-mw-thread-id="h-软件架构-机器人制作过程概览"><span id=".E8.BD.AF.E4.BB.B6.E6.9E.B6.E6.9E.84"></span><span data-mw-comment-start="" id="h-软件架构-机器人制作过程概览"></span>软件架构<span data-mw-comment-end="h-软件架构-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=12" title="编辑章节:软件架构"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>想一想你要怎么造这个机器人,用什么样的编程语言和工具。一般认为,使用软件架构能确保让软件系统符合产品需求,并且能确保迎合未来的需求。一些编程语言比另一些更适合做某些任务,更多细节请参考<a href="#编程语言和开发库">#编程语言和开发库</a>。</li></ul> <div class="mw-heading mw-heading4"><h4 id="实现" data-mw-thread-id="h-实现-机器人制作过程概览"><span id=".E5.AE.9E.E7.8E.B0"></span><span data-mw-comment-start="" id="h-实现-机器人制作过程概览"></span>实现<span data-mw-comment-end="h-实现-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=13" title="编辑章节:实现"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BC%96%E7%A8%8B" class="mw-redirect" title="计算机编程">实现</a>(编码)涉及到把设计和计划转变成代码。这可能是软件工程里面最显而易见的工作了,但是并没必要成为最大的一部分工作。在实现阶段,你需要做: </p> <ul><li>给你的机器人建立一个用户页。机器人绝对不能使用你自己的账号进行编辑。机器人需要它自己的账号,有自己的用户名和密码。</li> <li>在机器人的用户页上加入相同信息。加上一个指向讨论页面的链接是个不错的想法,大家可以对每一个功能提出赞成或者反对的意见。</li> <li>用你选择的编程语言对机器人编写代码。</li></ul> <div class="mw-heading mw-heading4"><h4 id="测试" data-mw-thread-id="h-测试-机器人制作过程概览"><span id=".E6.B5.8B.E8.AF.95"></span><span data-mw-comment-start="" id="h-测试-机器人制作过程概览"></span>测试<span data-mw-comment-end="h-测试-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=14" title="编辑章节:测试"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>测试你的机器人最好的方式是:让它把要进行的更改写在一个页面上,而不是对维基进行实际的更改。有的机器人框架(比如<a href="https://meta.wikimedia.org/wiki/Pywikipediabot" class="extiw" title="meta:Pywikipediabot">Pywikipediabot</a>)有一些现成的方法可以用来显示差异。在申请期间,机器人很可能会有一个试用期(有一些编辑次数或者运行时间上的限制),在此期间让它进行一些实际的编辑,便于对它进行微调、解决Bug。试用期结束的时候,如果一切都按照计划进行,机器人就应该能被批准执行全功能的操作。 </p> <div class="mw-heading mw-heading4"><h4 id="文档" data-mw-thread-id="h-文档-机器人制作过程概览"><span id=".E6.96.87.E6.A1.A3"></span><span data-mw-comment-start="" id="h-文档-机器人制作过程概览"></span>文档<span data-mw-comment-end="h-文档-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=15" title="编辑章节:文档"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>一个重要的(也是常常被忽视的)任务就是为机器人的内部设计撰写文档,这样是为了便于将来的维护和增强。如果你允许复制你的机器人的话,这就尤其重要了。如果你想让别人可以复制你的机器人,最理想的情况是在它的用户页上公布源代码。为了便于使用,代码应该有详细的文档说明(通常使用注释)。 </p> <div class="mw-heading mw-heading4"><h4 id="询问和抱怨" data-mw-thread-id="h-询问和抱怨-机器人制作过程概览"><span id=".E8.AF.A2.E9.97.AE.E5.92.8C.E6.8A.B1.E6.80.A8"></span><span data-mw-comment-start="" id="h-询问和抱怨-机器人制作过程概览"></span>询问和抱怨<span data-mw-comment-end="h-询问和抱怨-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=16" title="编辑章节:询问和抱怨"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>你应该准备好在你的对话页上回应对机器人的各种询问或反对意见,尤其是在机器人在一个潜在的敏感区域进行操作(比如清理<a href="/wiki/Wikipedia:%E5%90%88%E7%90%86%E4%BD%BF%E7%94%A8" title="Wikipedia:合理使用">合理使用</a>图像)的情况下。 </p> <div class="mw-heading mw-heading4"><h4 id="维护" data-mw-thread-id="h-维护-机器人制作过程概览"><span id=".E7.BB.B4.E6.8A.A4"></span><span data-mw-comment-start="" id="h-维护-机器人制作过程概览"></span>维护<span data-mw-comment-end="h-维护-机器人制作过程概览"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=17" title="编辑章节:维护"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>为了解决发现的Bug,或者迎合新的需求,维护和改进机器人会比一开始开发的时候花费的时间多得多。不光是加入与原始设计不相符的代码,仅仅就是确定软件维护完成之后在某些点上怎么工作,就需要很大的努力(这也是一直要为代码写文档的一个原因)。 </p> <ul><li>如果你要对机器人在功能上做一个重大的修改,应该<a href="/wiki/Wikipedia:%E6%9C%BA%E5%99%A8%E4%BA%BA/%E7%94%B3%E8%AF%B7" title="Wikipedia:机器人/申请">提出申请</a>。</li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="运行机器人的一般准则" data-mw-thread-id="h-运行机器人的一般准则"><span id=".E8.BF.90.E8.A1.8C.E6.9C.BA.E5.99.A8.E4.BA.BA.E7.9A.84.E4.B8.80.E8.88.AC.E5.87.86.E5.88.99"></span><span data-mw-comment-start="" id="h-运行机器人的一般准则"></span>运行机器人的一般准则<span data-mw-comment-end="h-运行机器人的一般准则"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=18" title="编辑章节:运行机器人的一般准则"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u8fd0\u884c\u673a\u5668\u4eba\u7684\u4e00\u822c\u51c6\u5219","replies":["h-\u7f16\u5199\u673a\u5668\u4eba\u7684\u6700\u4f73\u505a\u6cd5-\u8fd0\u884c\u673a\u5668\u4eba\u7684\u4e00\u822c\u51c6\u5219","h-\u5e94\u8be5\u8003\u8651\u5b9e\u73b0\u7684\u5e38\u89c1\u673a\u5668\u4eba\u7279\u5f81-\u8fd0\u884c\u673a\u5668\u4eba\u7684\u4e00\u822c\u51c6\u5219"]}}--></div> <p>官方的机器人政策给出了开发机器人的时候应该考虑的一些主要问题。除此之外,还有一些更一般的问题应该考虑。 </p> <div class="mw-heading mw-heading3"><h3 id="编写机器人的最佳做法" data-mw-thread-id="h-编写机器人的最佳做法-运行机器人的一般准则"><span id=".E7.BC.96.E5.86.99.E6.9C.BA.E5.99.A8.E4.BA.BA.E7.9A.84.E6.9C.80.E4.BD.B3.E5.81.9A.E6.B3.95"></span><span data-mw-comment-start="" id="h-编写机器人的最佳做法-运行机器人的一般准则"></span>编写机器人的最佳做法<span data-mw-comment-end="h-编写机器人的最佳做法-运行机器人的一般准则"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=19" title="编辑章节:编写机器人的最佳做法"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>按照<a href="https://meta.wikimedia.org/wiki/User-Agent_policy" class="extiw" title="meta:User-Agent policy">维基媒体用户代理政策</a>,为机器人设置一个<a href="/wiki/%E7%94%A8%E6%88%B7%E4%BB%A3%E7%90%86" title="用户代理">用户代理</a>头。如果不这样做的话,机器人可能会遇到错误,最终可能会被技术人员在服务器级别进行屏蔽。</li> <li>使用5秒的<a href="https://www.mediawiki.org/wiki/Manual:Maxlag_parameter" class="extiw" title="mw:Manual:Maxlag parameter">最大延迟参数</a>。这能让机器人在服务器负载低的时候快速运行,在服务器负载高的时候暂停运行。 <ul><li>如果编写机器人使用的框架不支持最大延迟的话,请限制总请求数(包括读写请求),不要超过每秒10次。</li></ul></li> <li>尽可能地使用<a href="/wiki/API" class="mw-redirect" title="API">API</a>,把查询频率限制到服务器允许的最大值,把总请求数设置为足够小的值。</li> <li>编辑(写)请求比读请求更耗费服务器时间。设计代码的时候,把编辑操作控制到最少。 <ul><li>尽量整合多次编辑。一次大编辑要好过十次小编辑。</li></ul></li> <li>如果可以的话,在HTTP客户端库里启用<a href="/wiki/HTTP%E6%8C%81%E4%B9%85%E8%BF%9E%E6%8E%A5" title="HTTP持久连接">HTTP持久链接</a>和<a href="/wiki/HTTP%E5%8E%8B%E7%BC%A9" title="HTTP压缩">HTTP压缩</a>。</li> <li>不要用多线程发出请求。等到一次请求完成之后再开始下一次请求。</li> <li>当从服务器收到错误信息的时候,使用二元指數後退演算法(Binary Exponential Backoff Algorithm) 进行延迟。像超时这样的错误常常意味着服务器负载过重。在重复发出的请求之间采用递增的时间延迟。</li> <li>使用<a href="https://www.mediawiki.org/wiki/Extension:Assert_Edit" class="extiw" title="mw:Extension:Assert Edit">断言编辑扩展</a>。这是一个专门为机器人设计的扩展,用来检查特定的条件是否成立。这个扩展已经在维基百科上启用了。</li> <li>在开始大型的自动化运行前,彻底测试好你的代码。逐个考察试运行期间所有的编辑操作,确保完美。</li></ul> <div class="mw-heading mw-heading3"><h3 id="应该考虑实现的常见机器人特征" data-mw-thread-id="h-应该考虑实现的常见机器人特征-运行机器人的一般准则"><span id=".E5.BA.94.E8.AF.A5.E8.80.83.E8.99.91.E5.AE.9E.E7.8E.B0.E7.9A.84.E5.B8.B8.E8.A7.81.E6.9C.BA.E5.99.A8.E4.BA.BA.E7.89.B9.E5.BE.81"></span><span data-mw-comment-start="" id="h-应该考虑实现的常见机器人特征-运行机器人的一般准则"></span>应该考虑实现的常见机器人特征<span data-mw-comment-end="h-应该考虑实现的常见机器人特征-运行机器人的一般准则"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=20" title="编辑章节:应该考虑实现的常见机器人特征"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="人工协助" data-mw-thread-id="h-人工协助-应该考虑实现的常见机器人特征"><span id=".E4.BA.BA.E5.B7.A5.E5.8D.8F.E5.8A.A9"></span><span data-mw-comment-start="" id="h-人工协助-应该考虑实现的常见机器人特征"></span>人工协助<span data-mw-comment-end="h-人工协助-应该考虑实现的常见机器人特征"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=21" title="编辑章节:人工协助"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>如果机器人所做的工作需要根据上下文进行判断或评价(例如改正拼写错误),你应该考虑让你的机器人可以人工协助。也就是说,别让机器人的编辑没有人工确认。 </p> <div class="mw-heading mw-heading4"><h4 id="停用机器人" data-mw-thread-id="h-停用机器人-应该考虑实现的常见机器人特征"><span id=".E5.81.9C.E7.94.A8.E6.9C.BA.E5.99.A8.E4.BA.BA"></span><span data-mw-comment-start="" id="h-停用机器人-应该考虑实现的常见机器人特征"></span>停用机器人<span data-mw-comment-end="h-停用机器人-应该考虑实现的常见机器人特征"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=22" title="编辑章节:停用机器人"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>好的机器人应该可以在有必要的时候停用。<b>请记住,如果你的机器人出错了,你有责任对这些错误进行清理!</b>你应该让机器人在看到对话页上留有特定信息的时候拒绝运行。这个信息可能是对它的活动抱怨的信息;这个可以用API <code>meta=userinfo</code> 查询(<span class="plainlinks"><a class="external text" href="https://en.wikipedia.org/w/api.php?action=query&meta=userinfo&uiprop=hasmsg">这里有个例子</a></span>)。或者,你可以设置一个页面,如果这个页面的内容被改动,机器人就会停止运行(例如,机器人需要这个页面是空的,仅仅有一个词“True”或者其他什么东西才能运行);可以在每次编辑之前载入这个页面,检查页面的内容。 </p> <div class="mw-heading mw-heading4"><h4 id="签名" data-mw-thread-id="h-签名-应该考虑实现的常见机器人特征"><span id=".E7.AD.BE.E5.90.8D"></span><span data-mw-comment-start="" id="h-签名-应该考虑实现的常见机器人特征"></span>签名<span data-mw-comment-end="h-签名-应该考虑实现的常见机器人特征"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=23" title="编辑章节:签名"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>就像人一样,如果机器人要编辑维基百科的讨论页,他也应该用四个波浪线(~~~~)留下签名。请记住,签名<b>只</b>应该留在讨论页(talk命名空间)上,不要让机器人在任何其他的页面上签名。 </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="开源机器人" data-mw-thread-id="h-开源机器人"><span id=".E5.BC.80.E6.BA.90.E6.9C.BA.E5.99.A8.E4.BA.BA"></span><span data-mw-comment-start="" id="h-开源机器人"></span>开源机器人<span data-mw-comment-end="h-开源机器人"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=24" title="编辑章节:开源机器人"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u5f00\u6e90\u673a\u5668\u4eba","replies":[]}}--></div> <p>许多操作机器人的人选择开放源代码,在有些情况下,申请特定的复杂机器人之前可能会要求开源。开放你的代码有几个好处: </p> <ul><li>允许别人再审查一下你的代码,发现潜在的Bug。As with prose,对于代码的作者来说,完全复审代码经常是件困难的事。</li> <li>别人可以使用你的代码制作他们自己的机器人。可以让一个刚开始写机器人的用户在写机器人的时候,能拿你的代码做例子或者模板。</li> <li>鼓励更安全的做法,而不是“隐藏就是安全”(“<a href="https://en.wikipedia.org/wiki/security_through_obscurity" class="extiw" title="en:security through obscurity">security through obscurity</a>”)。</li> <li>如果你离开这个项目了,允许其他用户不用写新代码就可以运行你的机器人。</li></ul> <p>虽然开源代码很少需要,有些情况下代码也不应该公开(例如英文维基百科中,机器人<a href="https://en.wikipedia.org/wiki/User:ProcseeBot" class="extiw" title="en:User:ProcseeBot">ProcseeBot</a>的开源代码中含有寻找代理的代码,就可以被其他网站用于恶意目的),但是维基百科鼓励开源,因为维基百科要保持开放和透明的性质。 </p><p>开放源代码可能为编写代码带来额外的工作。要确保把像密码这样的敏感信息分开保存在不公开的文件里。 </p><p>开放源代码有几种不同的选择。有的用户可能选择把代码放在机器人用户空间的一个子页面上,虽然这样会带来维护上麻烦(如果不是自动的话),而且会使代码在多个协议(维基百科的协议再加上你自己指定的协议)下发布。另一种解决方案是使用<a href="/wiki/%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6%E7%B3%BB%E7%BB%9F" class="mw-redirect" title="版本控制系统">版本控制系统</a>,比如<a href="/wiki/Subversion" title="Subversion">SVN</a>、<a href="/wiki/Git" title="Git">Git</a>、<a href="/wiki/Mercurial" title="Mercurial">Mercurial</a>。英文维基百科上有两个条目,一个是<a href="https://en.wikipedia.org/wiki/Comparison_of_revision_control_software" class="extiw" title="en:Comparison of revision control software">比较不同的版本控制系统之间的区别</a>,另一个<a href="https://en.wikipedia.org/wiki/Comparison_of_open_source_software_hosting_facilities" class="extiw" title="en:Comparison of open source software hosting facilities">比较不同开源软件托管设备间的区别</a>(目前(2012年1月19日)中文维基百科也有一个条目对应后者:<a href="/wiki/%E8%87%AA%E7%94%B1%E8%BD%AF%E4%BB%B6%E4%B8%BB%E6%9C%BA%E6%9C%8D%E5%8A%A1%E6%AF%94%E8%BE%83" class="mw-redirect" title="自由软件主机服务比较">自由软件主机服务比较</a>),其中很多是免费的。维基媒体工具服务(Wikimedia Toolserver)也为用户提供<a href="//www.mediawiki.org/wiki/Toolserver:Subversion" class="extiw" title="tswiki:Subversion">SVN托管服务</a>。 </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="编程语言和开发库" data-mw-thread-id="h-编程语言和开发库"><span id=".E7.BC.96.E7.A8.8B.E8.AF.AD.E8.A8.80.E5.92.8C.E5.BC.80.E5.8F.91.E5.BA.93"></span><span data-mw-comment-start="" id="h-编程语言和开发库"></span>编程语言和开发库<span data-mw-comment-end="h-编程语言和开发库"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=25" title="编辑章节:编程语言和开发库"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","replies":["h-Perl-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-PHP-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Python-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Microsoft_.NET-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Java-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-JavaScript-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Ruby-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Chicken_Scheme-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Common_Lisp-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Haskell-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-Tcl-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93","h-C++\/Qt4.5-\u7f16\u7a0b\u8bed\u8a00\u548c\u5f00\u53d1\u5e93"]}}--></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r85100532"><div role="note" class="hatnote navigation-not-searchable">参见:<a href="https://www.mediawiki.org/wiki/API:Client_Code" class="extiw" title="mw:API:Client Code">mw:API:Client Code</a></div> <p>几乎任何编程语言都可以编写机器人。选择什么样的语言常常取决于机器人编写者的经验(哪种语言比较熟悉),或者是哪种预先开发的库更适合于完成所需的任务。下面列出了一些语言,它们有一些开发库,用来协助完成机器人的任务。 </p> <div class="mw-heading mw-heading4"><h4 id="Perl" data-mw-thread-id="h-Perl-编程语言和开发库"><span data-mw-comment-start="" id="h-Perl-编程语言和开发库"></span>Perl<span data-mw-comment-end="h-Perl-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=26" title="编辑章节:Perl"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Perl" title="Perl">Perl</a>有<a href="/wiki/%E8%BF%90%E8%A1%8C%E6%97%B6" class="mw-redirect" title="运行时">运行时</a><a href="/wiki/%E7%BC%96%E8%AF%91%E5%99%A8" class="mw-redirect" title="编译器">编译器</a>。这就意味着不需要像其他语言那样自己编译每一次构建(Build)。相反,你只需要简单地使用像<a href="/wiki/Gvim" class="mw-redirect" title="Gvim">Gvim</a>这样的文本编辑器就能创建程序。然后,把代码交给<a href="/wiki/%E8%A7%A3%E9%87%8A%E5%99%A8" class="mw-redirect" title="解释器">解释器</a>执行。代码不是位于你自己的电脑上,就是位于远程电脑(<a href="/wiki/Web%E6%9C%8D%E5%8A%A1%E5%99%A8" class="mw-redirect" title="Web服务器">Web服务器</a>)上。如果位于Web服务器上,你可以通过<a href="/wiki/%E9%80%9A%E7%94%A8%E7%BD%91%E5%85%B3%E6%8E%A5%E5%8F%A3" title="通用网关接口">CGI</a>开始运行程序,启动接口服务。Perl适用于大多数操作系统,包括<a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a>、<a href="/wiki/Mac_OS_X" class="mw-redirect" title="Mac OS X">Mac OS X</a>和<a href="/wiki/UNIX" title="UNIX">UNIX</a>/<a href="/wiki/Linux" title="Linux">Linux</a>。如果你的<a href="/wiki/ISP" class="mw-redirect" title="ISP">ISP</a>提供给你Web空间,那么这是个好机会,你可以在Web服务器上访问、运行Perl程序。 </p><p>Perl编程入门指南: </p> <ul><li><a rel="nofollow" class="external text" href="http://www.perl.com/pub/a/2000/10/begperl1.html">A Beginner's Introduction to Perl</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li> <li><a rel="nofollow" class="external text" href="http://www.cgi101.com/book/">CGI Programming 101: Learn CGI Today!</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li> <li><a rel="nofollow" class="external text" href="http://www.cs.tut.fi/~jkorpela/perl/course.html">Perl lessons</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li> <li><a rel="nofollow" class="external text" href="http://perl.about.com/b/a/227771.htm">Get started learning Perl</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li></ul> <p>开发库: </p> <ul><li><a rel="nofollow" class="external text" href="https://search.cpan.org/~exobuzz/MediaWiki-API/">MediaWiki::API</a> – 一个Perl模块,基于MediaWiki API提供低级接口,允许检索、编辑、上传/下载文件。</li> <li><a rel="nofollow" class="external text" href="https://search.cpan.org/perldoc?MediaWiki::Bot">MediaWiki::Bot</a> – 一个相当完整的机器人架构,用Perl写成。提供比MediaWiki::API更高级的抽象。插件可提供管理功能。</li> <li><a rel="nofollow" class="external text" href="http://openfacts.berlios.de/index-en.phtml?title=Anura">Anura</a> – 使用libwww-perl的,到MediaWiki的Perl接口。不推荐使用,因为当前版本不会检查编辑冲突。</li> <li><a rel="nofollow" class="external text" href="https://search.cpan.org/perldoc?WWW::Mediawiki::Client">WWW::Mediawiki::Client</a> – Perl模块和命令行客户端。</li> <li><a rel="nofollow" class="external text" href="https://search.cpan.org/~bricas/WWW-Wikipedia-2.00/">WWW::Wikipedia</a> – Perl模块,提供维基百科接口。</li> <li><a rel="nofollow" class="external text" href="http://wiki.kn.vutbr.cz/mj/index.cgi?Perl%20Wikipedia%20toolkit">Perl Wikipedia ToolKit</a> – Perl模块,解析维基格式文本,提取数据。</li> <li><a rel="nofollow" class="external text" href="https://search.cpan.org/perldoc?MediaWiki">MediaWiki CPAN Package</a><sup class="noprint Inline-Template"><span style="white-space: nowrap;">[<a href="/wiki/Wikipedia:%E5%A4%B1%E6%95%88%E9%93%BE%E6%8E%A5" title="Wikipedia:失效链接"><span title="">失效連結</span></a>]</span></sup> by Edward Chernenko – 丰富的API,但是也有几个严重的Bug。</li> <li><a rel="nofollow" class="external text" href="https://svn.toolserver.org/svnroot/cbm/mediawiki-api/">Mediawiki::API</a> – 英文维基百科用户<a href="https://en.wikipedia.org/wiki/User:CBM" class="extiw" title="en:User:CBM">CBM</a>编写的开发库,具有强大的自动错误处理功能,包装了许多常见的API.php使用方式。这个开发库与CPAN上的开发库不同。</li></ul> <div class="mw-heading mw-heading4"><h4 id="PHP" data-mw-thread-id="h-PHP-编程语言和开发库"><span data-mw-comment-start="" id="h-PHP-编程语言和开发库"></span>PHP<span data-mw-comment-end="h-PHP-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=27" title="编辑章节:PHP"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/PHP" title="PHP">PHP</a>可以用于编写机器人。如果你想对机器人提供基于Web表单的接口,那么PHP是特别好的选择(尤其是使用cURL拓展,可以实现基于HTTP/HTTPS的请求)。举个例子,假如你想创建一个用于重命名分类的机器人,你可以创建一个HTML表单,把分类的当前和所需名称填到表单里。当表单提交的时候,机器人可以读取这些输入,然后编辑当前分类下的所有文章,把它们移动到所需的分类。(很显然,使用表单接口的机器人与在Web上随机冲浪的机器人相比,在某种程度上更加安全) </p> <style data-mw-deduplicate="TemplateStyles:r84318674">@media all and (max-width:500px){.mw-parser-output .hidden-div{width:auto!important;clear:none!important;float:none!important}}</style><div class="hidden-div mw-collapsible mw-collapsed" style="padding: 4px; border: 1px solid var(--border-color-base,#a2a9b1); text-align: center; font-size: 95%; color: inherit;"> <div class="skin-nightmode-reset-color collapsible-title" style="line-height: 1.6em; font-weight: bold; background-color: #ccf; color: var(--color-emphasized,#000); width: 100%; position: relative; ;">英文维基百科上有一个表格,显示了<a href="https://en.wikipedia.org/wiki/Wikipedia:PHP_bot_functions" class="extiw" title="en:Wikipedia:PHP bot functions">主要的PHP机器人框架的能力</a><span style="position: absolute; top: 0; right: 3px;"><span class="mw-collapsible-toggle-placeholder"></span></span> </div> <div style="clear:both;"></div> <div class="mw-collapsible-content" style="font-size: 100%; text-align: left;"> <style data-mw-deduplicate="TemplateStyles:r83732972">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}html.client-js body.skin-minerva .mw-parser-output .mbox-text-span{margin-left:23px!important}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .ambox{border-left-color:#36c!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-speedy,html.skin-theme-clientpref-night .mw-parser-output .ambox-delete{border-left-color:#b32424!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-speedy{background-color:#300!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-content{border-left-color:#f28500!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-style{border-left-color:#fc3!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-move{border-left-color:#9932cc!important}html.skin-theme-clientpref-night .mw-parser-output .ambox-protection{border-left-color:#a2a9b1!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .ambox{border-left-color:#36c!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-speedy,html.skin-theme-clientpref-os .mw-parser-output .ambox-delete{border-left-color:#b32424!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-speedy{background-color:#300!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-content{border-left-color:#f28500!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-style{border-left-color:#fc3!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-move{border-left-color:#9932cc!important}html.skin-theme-clientpref-os .mw-parser-output .ambox-protection{border-left-color:#a2a9b1!important}}</style><table class="plainlinks metadata ambox ambox-style" role="presentation"><tbody><tr><td class="mbox-image"><div style="width:52px"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Edit-clear.svg/40px-Edit-clear.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Edit-clear.svg/60px-Edit-clear.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Edit-clear.svg/80px-Edit-clear.svg.png 2x" data-file-width="48" data-file-height="48"/></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">自2012年1月19日起,本条目已经超过<b>90天</b>没有翻译。<span class="hide-when-compact"></span><span class="hide-when-compact"><br/><small>根据<a href="/wiki/Wikipedia:%E7%BF%BB%E8%AD%AF%E6%8C%87%E5%BC%95" title="Wikipedia:翻譯指引">翻译指引</a>,未翻译的内容将被及时清除。 <hr/> <small><b>致编者:</b>在清除未翻译内容后,请将本模板和翻译模板同时移除。</small></small></span><span class="hide-when-compact"></span></div></td><td class="mbox-imageright"><div style="width:52px"><span typeof="mw:File"><a href="/wiki/File:Translation_to_zh_arrow.svg" class="mw-file-description" title="翻译标记"><img alt="翻译标记" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/da/Translation_to_zh_arrow.svg/50px-Translation_to_zh_arrow.svg.png" decoding="async" width="50" height="17" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/da/Translation_to_zh_arrow.svg/75px-Translation_to_zh_arrow.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/da/Translation_to_zh_arrow.svg/100px-Translation_to_zh_arrow.svg.png 2x" data-file-width="60" data-file-height="20"/></a></span></div></td></tr></tbody></table> <table class="wikitable sortable" border="1"> <caption>Current PHP Bot frameworks </caption> <tbody><tr> <th>Key people<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>php 1<span class="cite-bracket">]</span></a></sup></th> <th>Name</th> <th>PHP Version</th> <th>Uses API<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>php 2<span class="cite-bracket">]</span></a></sup></th> <th><a href="/wiki/Template:Bots" title="Template:Bots">Exclusion compliant</a></th> <th>Admin functions</th> <th>Plugins</th> <th>Repository</th> <th>Notes </th></tr> <tr> <td><a href="/wiki/User:X!" title="User:X!">X!</a>, others</td> <td><a href="/w/index.php?title=Wikipedia:Peachy&action=edit&redlink=1" class="new" title="Wikipedia:Peachy(页面不存在)">Peachy</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5.2.1</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td><a href="/wiki/Google_Code" class="mw-redirect" title="Google Code">Google Code</a></td> <td>Large framework, currently undergoing rewrite. Documentation is down. </td></tr> <tr> <td><a href="/w/index.php?title=User:Cobi&action=edit&redlink=1" class="new" title="User:Cobi(页面不存在)">Cobi</a></td> <td><a href="/w/index.php?title=User:ClueBot/Source&action=edit&redlink=1" class="new" title="User:ClueBot/Source(页面不存在)">wikibot.classes</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>enwiki</td> <td>Used by multiple large bots (e.g. <a href="/w/index.php?title=User:ClueBot&action=edit&redlink=1" class="new" title="User:ClueBot(页面不存在)">ClueBot</a> and <a href="/w/index.php?title=User:SoxBot&action=edit&redlink=1" class="new" title="User:SoxBot(页面不存在)">SoxBot</a>). Uses several <a href="/w/index.php?title=Class_(programming)&action=edit&redlink=1" class="new" title="Class (programming)(页面不存在)">class</a>es. </td></tr> <tr> <td><a href="/wiki/User:Chris_G" title="User:Chris G">Chris G</a></td> <td><a rel="nofollow" class="external text" href="http://toolserver.org/~chris/highlight.php?d=chris/classes/&f=botclasses.php">botclasses.php</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td><a href="/wiki/Wikipedia:Toolserver" class="mw-redirect" title="Wikipedia:Toolserver">Toolserver</a></td> <td>Fork of wikibot.classes. Updated for 2010 API changes. Supports file uploading. </td></tr> <tr> <td><a href="/wiki/User:Kaspo" title="User:Kaspo">Kaspo</a></td> <td><a href="/w/index.php?title=User:Kaspo/Phpwikibot&action=edit&redlink=1" class="new" title="User:Kaspo/Phpwikibot(页面不存在)">Phpwikibot</a></td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td style="background: #FFD; color: black; vertical-align: middle; text-align: center;" class="partial table-partial skin-invert">部份</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>Google Code</td> <td>Uses a single class. </td></tr> <tr> <td><a href="/wiki/User:Jarry1250" title="User:Jarry1250">Jarry1250</a></td> <td><a href="/w/index.php?title=User:LivingBot/Wikibot&action=edit&redlink=1" class="new" title="User:LivingBot/Wikibot(页面不存在)">Wikibot</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>enwiki</td> <td>Used solely by <a href="/w/index.php?title=User:LivingBot&action=edit&redlink=1" class="new" title="User:LivingBot(页面不存在)">LivingBot</a>. A fork of Phpwikibot. Uses a single class. </td></tr> <tr> <td>Adam</td> <td><a rel="nofollow" class="external text" href="http://wikisum.com/w/User:Adam/Creating_MediaWiki_bots_in_PHP">BasicBot</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5 or 4</td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>wikisum.com</td> <td>Fairly out of date </td></tr> <tr> <td><a href="/w/index.php?title=User:Xiaomao123&action=edit&redlink=1" class="new" title="User:Xiaomao123(页面不存在)">Xiaomao123</a></td> <td><a rel="nofollow" class="external text" href="https://www.softx.tk/wiki/SoftX:PHPwikiBot">SoftX PHPwikiBot</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5.2+</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td style="background: #FFD; color: black; vertical-align: middle; text-align: center;" class="partial table-partial skin-invert">部份</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td><a href="/w/index.php?title=TuxFamily&action=edit&redlink=1" class="new" title="TuxFamily(页面不存在)">TuxFamily</a></td> <td>Based on <a href="/w/index.php?title=User:LivingBot/Wikibot&action=edit&redlink=1" class="new" title="User:LivingBot/Wikibot(页面不存在)">Wikibot</a> with many modification. Most significant feature is that it uses a single cURL handle for all request and uses keep-alive. </td></tr> <tr> <td><a href="/wiki/User:Foxy_Loxy" title="User:Foxy Loxy">Foxy Loxy</a></td> <td><a rel="nofollow" class="external text" href="http://pwiki.sourceforge.net/docs/">PHPediaWiki</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>SourceForge</td> <td>Fork of SxWiki </td></tr> <tr> <td><a href="/w/index.php?title=User:Edward_Z._Yang&action=edit&redlink=1" class="new" title="User:Edward Z. Yang(页面不存在)">Edward Z. Yang</a></td> <td><a href="/w/index.php?title=User:Edward_Z._Yang/Wikipedia_Bot_in_PHP&action=edit&redlink=1" class="new" title="User:Edward Z. Yang/Wikipedia Bot in PHP(页面不存在)">Wikpedia Bot in PHP</a></td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>enwiki</td> <td>"Probably stale" source code </td></tr> <tr> <td><a href="/w/index.php?title=User:GeorgeMoney&action=edit&redlink=1" class="new" title="User:GeorgeMoney(页面不存在)">GeorgeMoney</a></td> <td><a href="/w/index.php?title=User:GeorgeMoney/Bot_Framework&action=edit&redlink=1" class="new" title="User:GeorgeMoney/Bot Framework(页面不存在)">Bot Framework</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5 or 4</td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td style="background:var(--background-color-neutral,#E4E4E4); color: inherit; vertical-align:middle; text-align:center; font-size:smaller;" class="unknown table-unknown">未知</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>enwiki</td> <td>Hard to get hold of current code </td></tr> <tr> <td><a href="/wiki/User:Sam_Korn" title="User:Sam Korn">Sam Korn</a></td> <td><a rel="nofollow" class="external text" href="http://pillar.googlecode.com/">Pillar</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td>Google Code</td> <td><a href="/wiki/MIT_license" class="mw-redirect" title="MIT license">MIT license</a> </td></tr> <tr> <td><a href="https://bg.wikipedia.org/wiki/User:%D0%93%D1%80%D0%B8%D0%B3%D0%BE%D1%80_%D0%93%D0%B0%D1%87%D0%B5%D0%B2" class="extiw" title="bg:User:Григор Гачев">Григор Гачев</a></td> <td><a rel="nofollow" class="external text" href="http://apibot.zavinagi.org/">Apibot</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5.1</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td><a rel="nofollow" class="external text" href="http://apibot.zavinagi.org/index.php/Development_code">Apibot code</a></td> <td>Full API support, compression, HTTPS, HTTP auth etc. Over 300 basic module functions. Overlayed iterator framework. </td></tr> <tr> <td><a href="/w/index.php?title=User:Nzhamstar&action=edit&redlink=1" class="new" title="User:Nzhamstar(页面不存在)">User:nzhamstar</a></td> <td><a rel="nofollow" class="external text" href="https://github.com/hamstar/Wikimate">Wikimate</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5.3.2</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td><a href="/wiki/Github" class="mw-redirect" title="Github">Github</a></td> <td>Supports main article stuff. Authentication, Reading and editing pages/sections, checking if pages exist. Tested and working. Aims to be easy to use. </td></tr> <tr> <td><a href="/w/index.php?title=User:Kalebheitzman&action=edit&redlink=1" class="new" title="User:Kalebheitzman(页面不存在)">Kaleb Heitzman</a></td> <td><a rel="nofollow" class="external text" href="https://github.com/kalebheitzman/mediawikibot">MediaWIkiBot</a></td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">5</td> <td class="table-yes skin-invert" style="text-align:center; background:#90FF90">是</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td class="table-no skin-invert" style="text-align:center; background:#FF9090">否</td> <td><a href="/wiki/Github" class="mw-redirect" title="Github">Github</a></td> <td>Supports the entire API including uploading and importing. Also supports Semantic MediaWiki. Single Class that creates dynamic methods to work with any of the API calls. </td></tr></tbody></table> <div class="reflist" style="list-style-type: decimal;"> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text">Does not include those who worked on frameworks forked to create listed framework.</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text">Where possible. Excludes uploading images and other such tasks which are not currently supported by the API.</span> </li> </ol></div> </div></div> <div class="mw-heading mw-heading4"><h4 id="Python" data-mw-thread-id="h-Python-编程语言和开发库"><span data-mw-comment-start="" id="h-Python-编程语言和开发库"></span>Python<span data-mw-comment-end="h-Python-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=28" title="编辑章节:Python"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Python" title="Python">Python</a>是一种流行的解释型面向对象语言。 </p><p>Python入门: </p> <ul><li><a rel="nofollow" class="external text" href="https://docs.python.org/tut/">Official Python tutorial</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li> <li><a rel="nofollow" class="external text" href="https://wiki.python.org/moin/BeginnersGuide">Beginner's Guide to coding in python</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li> <li><a rel="nofollow" class="external text" href="http://diveintopython.net/toc/index.html"><i>Dive Into Python</i></a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li></ul> <p>开发库: </p> <ul><li><a href="https://www.mediawiki.org/wiki/Pywikipediabot" class="extiw" title="mw:Pywikipediabot">PyWikipediaBot</a> — Python维基百科机器人框架 (<a rel="nofollow" class="external text" href="http://pywikipediabot.sourceforge.net/">主页</a>,<a rel="nofollow" class="external text" href="http://sourceforge.net/projects/pywikipediabot/">sourceforge项目页面</a>)</li> <li><a rel="nofollow" class="external text" href="https://code.google.com/p/python-wikitools/">wikitools</a> — 使用MediaWiki API的轻量级机器人框架,专门用于获取数据和编辑,由英文维基百科用户<a href="https://en.wikipedia.org/wiki/User:Mr.Z-man" class="extiw" title="en:User:Mr.Z-man">Mr.Z-man</a>使用和维护。(<a rel="nofollow" class="external text" href="https://code.google.com/p/python-wikitools/downloads/list">下载</a>)</li> <li><a rel="nofollow" class="external text" href="http://sourceforge.net/projects/mwclient/">mwclient</a> — 基于API的框架,由英文维基百科用户<a href="https://en.wikipedia.org/wiki/User:Bryan" class="extiw" title="en:User:Bryan">Bryan</a>维护。</li></ul> <div class="mw-heading mw-heading4"><h4 id="Microsoft_.NET" data-mw-thread-id="h-Microsoft_.NET-编程语言和开发库"><span data-mw-comment-start="" id="h-Microsoft_.NET-编程语言和开发库"></span>Microsoft .NET<span data-mw-comment-end="h-Microsoft_.NET-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=29" title="编辑章节:Microsoft .NET"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Microsoft_.NET" class="mw-redirect" title="Microsoft .NET">Microsoft .NET</a>是一组编程语言,包括<a href="/wiki/Microsoft_Visual_C_Sharp" class="mw-redirect" title="Microsoft Visual C Sharp">C#</a>、<a href="/wiki/C%2B%2B/CLI" title="C++/CLI">C++/CLI</a>、<a href="/wiki/Visual_Basic_.NET" title="Visual Basic .NET">Visual Basic .NET</a>、<a href="/wiki/J_Sharp" class="mw-redirect" title="J Sharp">J#</a>、<a href="/wiki/JScript_.NET" title="JScript .NET">JScript .NET</a>、<a href="/wiki/IronPython" title="IronPython">IronPython</a>,和<a href="/wiki/Windows_PowerShell" class="mw-redirect" title="Windows PowerShell">Windows PowerShell</a>。经常使用的开发环境是<a href="/wiki/Microsoft_Visual_Studio" title="Microsoft Visual Studio">Microsoft Visual Studio</a> <a href="/wiki/Integrated_development_environment" class="mw-redirect" title="Integrated development environment">integrated development environment</a>,或者是其免费版本<a href="/wiki/Microsoft_Visual_Studio_Express" title="Microsoft Visual Studio Express">Microsoft Visual Studio Express</a>。.NET程序使用<a href="/wiki/Mono_(software)" class="mw-redirect" title="Mono (software)">Mono Project</a>,可以在<a href="/wiki/Linux" title="Linux">Linux</a>、<a href="/wiki/Unix" class="mw-redirect" title="Unix">Unix</a>、<a href="/wiki/BSD" title="BSD">BSD</a>、<a href="/wiki/Solaris" title="Solaris">Solaris</a>、<a href="/wiki/Mac_OS_X" class="mw-redirect" title="Mac OS X">Mac OS X</a>,以及<a href="/wiki/Windows" class="mw-redirect" title="Windows">Windows</a>上运行。 </p><p>入门: </p> <ul><li><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/zh-cn/vbasic/default.aspx">MSDN Visual Basic 官方网站</a></li> <li><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/zh-cn/vcsharp/default.aspx">MSDN Visual C# 官方网站</a></li></ul> <p>Libraries: </p> <ul><li><a rel="nofollow" class="external text" href="http://dotnetwikibot.sourceforge.net/">DotNetWikiBot Framework</a> – 全功能的客户端API,允许简易地创建程序和Web机器人,用于管理MediaWiki站点上的信息。目前已经翻译成了多种语言。详细的编译文档是英文版本。</li> <li><a rel="nofollow" class="external text" href="http://sourceforge.net/project/showfiles.php?group_id=158332">WikiFunctions .NET library</a> – 与<a href="/wiki/Wikipedia:AutoWikiBrowser" title="Wikipedia:AutoWikiBrowser">自动维基浏览器</a>捆绑,是对机器人有用的开发库,例如生成列表、载入和编辑文章、连接到最近更改IRC频道等等。</li> <li><a rel="nofollow" class="external text" href="http://sourceforge.net/projects/wikiaccess">WikiAccess library</a></li> <li><a rel="nofollow" class="external text" href="https://code.google.com/p/mediawikiengine/">MediaWikiEngine</a> – 用于<a rel="nofollow" class="external text" href="https://code.google.com/p/wikimediacommonplace/">Commonplace上传工具</a>。</li> <li><a rel="nofollow" class="external text" href="https://code.google.com/p/tyngmediawiki">Tyng.MediaWiki class library</a> – 用C#写成的MediaWiki API,被英文维基百科用户<a href="https://en.wikipedia.org/wiki/User:NrhpBot" class="extiw" title="en:User:NrhpBot">NrhpBot</a>使用。</li></ul> <div class="mw-heading mw-heading4"><h4 id="Java" data-mw-thread-id="h-Java-编程语言和开发库"><span data-mw-comment-start="" id="h-Java-编程语言和开发库"></span>Java<span data-mw-comment-end="h-Java-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=30" title="编辑章节:Java"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Java" title="Java">Java</a>程序一般使用IDE开发,比如<a href="/wiki/Eclipse" title="Eclipse">Eclipse</a>;也可以使用命令行控制台开发(使用<a href="/wiki/Javac" title="Javac">javac</a>和其他Java程序)。 </p><p>入门: </p> <ul><li><a rel="nofollow" class="external text" href="http://jwbf.sourceforge.net/getting-started/">Getting started</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="英語">(英文)</span></li></ul> <p>开发库: </p> <ul><li><a rel="nofollow" class="external text" href="http://jwbf.sourceforge.net/">Java Wiki Bot Framework</a></li> <li><a rel="nofollow" class="external text" href="https://code.google.com/p/wiki-java/">User:MER-C/Wiki.java</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="JavaScript" data-mw-thread-id="h-JavaScript-编程语言和开发库"><span data-mw-comment-start="" id="h-JavaScript-编程语言和开发库"></span>JavaScript<span data-mw-comment-end="h-JavaScript-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=31" title="编辑章节:JavaScript"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/JavaScript" title="JavaScript">JavaScript</a>是一种主要用于网页的<a href="/wiki/%E8%84%9A%E6%9C%AC%E8%AF%AD%E8%A8%80" title="脚本语言">脚本语言</a>。通过把JavaScript脚本添加到<a href="/wiki/Special:%E6%88%91%E7%9A%84%E7%94%A8%E6%88%B7%E9%A1%B5/vector.js" title="Special:我的用户页/vector.js">your vector.js</a>或者<a href="/wiki/Special:%E6%88%91%E7%9A%84%E7%94%A8%E6%88%B7%E9%A1%B5/monobook.js" title="Special:我的用户页/monobook.js">your monobook.js</a>,可以增强维基百科的功能。在某些情况下,JavaScript脚本也可能离线执行。 </p><p>开发库: </p> <ul><li>英文维基百科上的机器人<a href="https://en.wikipedia.org/wiki/User:Luas%C3%B3g_bot" class="extiw" title="en:User:Luasóg bot">Luasóg bot</a>是一个JavaScript框架,可用于标准的请求(例如登录、退出、读取、编辑等等),也有对MediaWiki API的一般包装方法,还包含了像节流这样那个的有用的东西。这个项目包含了一个低级的IDE,可用于离线开发和执行。</li> <li><a href="/wiki/User:Cewbot" title="User:Cewbot">Cewbot</a> 採用了包含製作機器人功能的 <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> <a href="/wiki/%E8%BB%9F%E9%AB%94%E6%9E%B6%E6%A7%8B" class="mw-redirect" title="軟體架構">軟體架構</a>,可離線開發和運行。</li></ul> <dl><dd>framework: <a rel="nofollow" class="external text" href="https://github.com/kanasimi/wikiapi">wikiapi</a> / CeJS <a rel="nofollow" class="external text" href="https://github.com/kanasimi/CeJS/blob/master/application/net/wiki">MediaWiki 自動化作業用的程式庫</a></dd> <dd><a href="/wiki/%E6%89%A7%E8%A1%8C%E7%8E%AF%E5%A2%83" class="mw-redirect" title="执行环境">可執行環境</a>: <a href="/wiki/Node.js" title="Node.js">node.js</a>, <a href="/wiki/JScript" title="JScript">JScript</a></dd> <dd><a rel="nofollow" class="external text" href="https://github.com/kanasimi/wikibot">採用 CeJS 函式庫來製作維基百科機器人的範例</a></dd></dl> <div class="mw-heading mw-heading4"><h4 id="Ruby" data-mw-thread-id="h-Ruby-编程语言和开发库"><span data-mw-comment-start="" id="h-Ruby-编程语言和开发库"></span>Ruby<span data-mw-comment-end="h-Ruby-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=32" title="编辑章节:Ruby"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>开发库: </p> <ul><li><a rel="nofollow" class="external text" href="https://github.com/jpatokal/mediawiki-gateway">MediaWiki::Gateway</a> – API的<a href="/wiki/Ruby" title="Ruby">Ruby</a>框架。已积极地维护、测试到了MediaWiki 1.16,与维基媒体的诸站点兼容。</li> <li><a rel="nofollow" class="external text" href="http://rbmediawiki.rubyforge.org">rbmediawiki</a> – 用Ruby编写机器人的框架,使用MediaWiki的API。作者是英文维基百科用户<a href="https://en.wikipedia.org/wiki/User:Ignacio_Icke" class="extiw" title="en:User:Ignacio Icke">Ignacio Icke</a>。</li></ul> <div class="mw-heading mw-heading4"><h4 id="Chicken_Scheme" data-mw-thread-id="h-Chicken_Scheme-编程语言和开发库"><span data-mw-comment-start="" id="h-Chicken_Scheme-编程语言和开发库"></span>Chicken Scheme<span data-mw-comment-end="h-Chicken_Scheme-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=33" title="编辑章节:Chicken Scheme"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Iron Chicken是<a href="/w/index.php?title=Chicken_Scheme&action=edit&redlink=1" class="new" title="Chicken Scheme(页面不存在)">Chicken Scheme</a>的扩展,使Mediawiki API可以用<a href="/wiki/S-%E8%A1%A8%E8%BE%BE%E5%BC%8F" title="S-表达式">S-表达式</a>编写,提供API和<a href="/wiki/SXML" title="SXML">SXML</a>格式的HTML输出,可以很容易地查询。 </p><p>示例:获取一个分类的成员,写入一个客户端用户的用户空间页面: </p> <ul><li><a href="https://en.wikipedia.org/wiki/User:Tony_Sidaway/scripts/categorymembers" class="extiw" title="en:User:Tony Sidaway/scripts/categorymembers">en:User:Tony Sidaway/scripts/categorymembers</a></li></ul> <p>开发库: </p> <ul><li><a rel="nofollow" class="external text" href="http://www.call-with-current-continuation.org/eggs/irnc-base.html">irnc-base</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="Common_Lisp" data-mw-thread-id="h-Common_Lisp-编程语言和开发库"><span data-mw-comment-start="" id="h-Common_Lisp-编程语言和开发库"></span>Common Lisp<span data-mw-comment-end="h-Common_Lisp-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=34" title="编辑章节:Common Lisp"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="https://trac.acceleration.net/cl-mediawiki/wiki">cl-mediawiki</a>是实现了MediaWikiAPI的<a href="/wiki/Common_Lisp" title="Common Lisp">Common Lisp</a>包。使用<a href="/wiki/JSON" title="JSON">JSON</a>作为查询数据格式。支持最大延迟和断言编辑扩展。</li></ul> <div class="mw-heading mw-heading4"><h4 id="Haskell" data-mw-thread-id="h-Haskell-编程语言和开发库"><span data-mw-comment-start="" id="h-Haskell-编程语言和开发库"></span>Haskell<span data-mw-comment-end="h-Haskell-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=35" title="编辑章节:Haskell"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="http://hackage.haskell.org/package/mediawiki">http://hackage.haskell.org/package/mediawiki</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="Tcl" data-mw-thread-id="h-Tcl-编程语言和开发库"><span data-mw-comment-start="" id="h-Tcl-编程语言和开发库"></span>Tcl<span data-mw-comment-end="h-Tcl-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=36" title="编辑章节:Tcl"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="http://svn.toolserver.org/svnroot/gifti/bot">MediaWiki Tcl Bot Framework</a> – 包含IRC-RC接口。</li></ul> <div class="mw-heading mw-heading4"><h4 id="C++/Qt4.5" data-mw-thread-id="h-C++/Qt4.5-编程语言和开发库"><span id="C.2B.2B.2FQt4.5"></span><span data-mw-comment-start="" id="h-C++/Qt4.5-编程语言和开发库"></span>C++/Qt4.5<span data-mw-comment-end="h-C++/Qt4.5-编程语言和开发库"></span></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&action=edit&section=37" title="编辑章节:C++/Qt4.5"><span>编辑</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external autonumber" href="http://www.prog.org.ru/index.php?topic=15336.msg116196">[1]</a><span style="font-family: sans-serif; cursor: default; color:var(--color-subtle, #54595d); font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="俄語">(俄文)</span> – 简单的维基媒体机器人,用<a href="/wiki/C%2B%2B" title="C++">C++</a>/<a href="/wiki/Qt" title="Qt">Qt</a>写成,只有很少的功能,像认证、获取页面源码、提交页面源码。</li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐78f4c97c5d‐zhdkx Cached time: 20241128221223 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] DiscussionTools time usage: 0.055 seconds CPU time usage: 0.472 seconds Real time usage: 0.588 seconds Preprocessor visited node count: 1663/1000000 Post‐expand include size: 238796/2097152 bytes Template argument size: 2910/2097152 bytes Highest expansion depth: 20/100 Expensive parser function count: 6/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 12491/5000000 bytes Lua time usage: 0.102/10.000 seconds Lua memory usage: 6062506/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 343.339 1 -total 19.93% 68.436 1 Wikipedia:PHP机器人框架表 16.62% 57.073 1 Template:NoteTA 15.54% 53.347 1 Template:Botnav 14.89% 51.135 1 Template:Mbox 14.37% 49.347 1 Template:Distinguish 13.99% 48.045 1 Template:Hatnote 13.21% 45.339 1 Template:Dead_link 8.98% 30.826 2 Template:Flatlist 8.19% 28.123 1 Template:过期翻译 --> <!-- Saved in parser cache with key zhwiki:pcache:1368586:|#|:idhash:canonical!zh and timestamp 20241128221223 and revision id 75667260. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">检索自“<a dir="ltr" href="https://zh.wikipedia.org/w/index.php?title=Wikipedia:製作機器人&oldid=75667260">https://zh.wikipedia.org/w/index.php?title=Wikipedia:製作機器人&oldid=75667260</a>”</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:%E9%A1%B5%E9%9D%A2%E5%88%86%E7%B1%BB" title="Special:页面分类">分类</a>:<ul><li><a href="/wiki/Category:%E7%B6%AD%E5%9F%BA%E7%99%BE%E7%A7%91%E6%A9%9F%E5%99%A8%E4%BA%BA" title="Category:維基百科機器人">維基百科機器人</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">隐藏分类:<ul><li><a href="/wiki/Category:%E8%BF%87%E6%9C%9F%E7%9A%84%E7%BF%BB%E8%AF%91%E6%9D%A1%E7%9B%AE" title="Category:过期的翻译条目">过期的翻译条目</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> 本页面最后修订于2023年1月24日 (星期二) 14:48。</li> <li id="footer-info-copyright">本站的全部文字在<a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/deed.zh">知识共享 署名-相同方式共享 4.0协议</a>之条款下提供,附加条款亦可能应用。(请参阅<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">使用条款</a>)<br /> Wikipedia®和维基百科标志是<a rel="nofollow" class="external text" href="https://wikimediafoundation.org/zh">维基媒体基金会</a>的注册商标;维基™是维基媒体基金会的商标。<br /> 维基媒体基金会是按美国国內稅收法501(c)(3)登记的<a class="external text" href="https://donate.wikimedia.org/wiki/Special:MyLanguage/Tax_deductibility">非营利慈善机构</a>。<br /></li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">隐私政策</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:%E5%85%B3%E4%BA%8E">关于维基百科</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:%E5%85%8D%E8%B4%A3%E5%A3%B0%E6%98%8E">免责声明</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">行为准则</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">开发者</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/zh.wikipedia.org">统计</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie声明</a></li> <li id="footer-places-mobileview"><a href="//zh.m.wikipedia.org/w/index.php?title=Wikipedia:%E8%A3%BD%E4%BD%9C%E6%A9%9F%E5%99%A8%E4%BA%BA&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">手机版视图</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-88fr9","wgBackendResponseTime":180,"wgDiscussionToolsPageThreads":[{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-为何需要机器人?","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-製作机器人前先仔细想好","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-维基机器人的工作原理","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-概论-维基机器人的工作原理","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-用API寫机器人-维基机器人的工作原理","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-登入/建立新帳號-维基机器人的工作原理","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-编辑;编辑令牌-维基机器人的工作原理","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-编辑冲突-维基机器人的工作原理","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-机器人制作过程概览","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-构思-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-细化-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-软件架构-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-实现-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-测试-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-文档-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-询问和抱怨-机器人制作过程概览","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-维护-机器人制作过程概览","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-运行机器人的一般准则","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-编写机器人的最佳做法-运行机器人的一般准则","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-应该考虑实现的常见机器人特征-运行机器人的一般准则","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-人工协助-应该考虑实现的常见机器人特征","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-停用机器人-应该考虑实现的常见机器人特征","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-签名-应该考虑实现的常见机器人特征","replies":[]}]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-开源机器人","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-编程语言和开发库","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Perl-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-PHP-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Python-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Microsoft_.NET-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Java-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-JavaScript-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Ruby-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Chicken_Scheme-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Common_Lisp-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Haskell-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Tcl-编程语言和开发库","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-C++/Qt4.5-编程语言和开发库","replies":[]}]}],"wgPageParseReport":{"discussiontools":{"limitreport-timeusage":"0.055"},"limitreport":{"cputime":"0.472","walltime":"0.588","ppvisitednodes":{"value":1663,"limit":1000000},"postexpandincludesize":{"value":238796,"limit":2097152},"templateargumentsize":{"value":2910,"limit":2097152},"expansiondepth":{"value":20,"limit":100},"expensivefunctioncount":{"value":6,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":12491,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 343.339 1 -total"," 19.93% 68.436 1 Wikipedia:PHP机器人框架表"," 16.62% 57.073 1 Template:NoteTA"," 15.54% 53.347 1 Template:Botnav"," 14.89% 51.135 1 Template:Mbox"," 14.37% 49.347 1 Template:Distinguish"," 13.99% 48.045 1 Template:Hatnote"," 13.21% 45.339 1 Template:Dead_link"," 8.98% 30.826 2 Template:Flatlist"," 8.19% 28.123 1 Template:过期翻译"]},"scribunto":{"limitreport-timeusage":{"value":"0.102","limit":"10.000"},"limitreport-memusage":{"value":6062506,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-78f4c97c5d-zhdkx","timestamp":"20241128221223","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>