Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derhuerst/fetch-wikipedia-page-revision
Fetch a revision of a Wikipedia page as mobile HTML.
https://github.com/derhuerst/fetch-wikipedia-page-revision
html p2p wiki wikipedia
Last synced: 6 days ago
JSON representation
Fetch a revision of a Wikipedia page as mobile HTML.
- Host: GitHub
- URL: https://github.com/derhuerst/fetch-wikipedia-page-revision
- Owner: derhuerst
- License: isc
- Created: 2017-07-27T17:05:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-12T17:35:29.000Z (over 4 years ago)
- Last Synced: 2024-10-03T23:55:25.765Z (about 1 month ago)
- Topics: html, p2p, wiki, wikipedia
- Language: JavaScript
- Homepage: https://github.com/derhuerst/fetch-wikipedia-page-revision
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# fetch-wikipedia-page-revision
**Fetch a revision of a Wikipedia page as mobile HTML.**
[![npm version](https://img.shields.io/npm/v/fetch-wikipedia-page-revision.svg)](https://www.npmjs.com/package/fetch-wikipedia-page-revision)
[![build status](https://img.shields.io/travis/derhuerst/fetch-wikipedia-page-revision.svg)](https://travis-ci.org/derhuerst/fetch-wikipedia-page-revision)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/fetch-wikipedia-page-revision.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)## Installing
```shell
npm install fetch-wikipedia-page-revision
```## Usage
```js
const fetchPageRevision = require('fetch-wikipedia-page-revision')const slug = 'Barack_Obama'
const revId = 792351024fetchPageRevision(slug, revId)
.then(console.log)
.catch(console.error)
```The [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/promise) will resolve with a string of HTML.
## Contributing
If you have a question or have difficulties using `fetch-wikipedia-page-revision`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/fetch-wikipedia-page-revision/issues).