---
id: bd7158d8c442eddfaeb5bd19
title: Build a Wikipedia Viewer
challengeType: 3
isRequired: false
videoUrl: ''
localeTitle: 构建Wikipedia查看器
---

## Description
<section id="description"> <strong>目标：</strong>构建一个功能类似于此的<a href="https://codepen.io" target="_blank">CodePen.io</a>应用程序： <a href="https://codepen.io/freeCodeCamp/full/wGqEga/" target="_blank">https</a> <strong>：</strong> <a href="https://codepen.io" target="_blank">//codepen.io/freeCodeCamp/full/wGqEga/</a> 。完成以下<a href="https://en.wikipedia.org/wiki/User_story" target="_blank">用户故事</a> 。使用您需要的任何库或API。给它你自己的个人风格。 <strong>用户故事：</strong>我可以在搜索框中搜索维基百科条目，并查看生成的维基百科条目。 <strong>用户故事：</strong>我可以单击按钮查看随机的Wikipedia条目。 <span class="text-info">提示＃1：</span>这是一个可用于获取随机维基百科文章的URL： <code>https://en.wikipedia.org/wiki/Special:Random</code> ： <code>https://en.wikipedia.org/wiki/Special:Random</code> :Random。 <span class="text-info">提示＃2：</span>这是使用维基百科API的条目： <code>https://www.mediawiki.org/wiki/API:Main_page</code> ： <code>https://www.mediawiki.org/wiki/API:Main_page</code> ： <code>https://www.mediawiki.org/wiki/API:Main_page</code> 。 <span class="text-info">提示＃3：</span>使用此<a href="https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&#x26;titles=Main%20Page&#x26;prop=revisions&#x26;rvprop=content&#x26;format=jsonfm" target="_blank">链接</a>试验维基百科的API。如果卡住，请记得使用<a href="http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514" target="_blank">Read-Search-Ask</a> 。完成后，单击“我已完成此挑战”按钮并包含指向CodePen的链接。您可以通过Facebook上的朋友分享您的项目反馈。 </section>

## Instructions
<section id="instructions">
</section>

## Tests
<section id='tests'>

```yml
tests: []

```

</section>

## Challenge Seed
<section id='challengeSeed'>

</section>

## Solution
<section id='solution'>

```js
// solution required
```
</section>
