Skip to content

Commit

Permalink
Rename video-provider → media-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 1, 2018
1 parent 137b2f4 commit 2838e12
Show file tree
Hide file tree
Showing 16 changed files with 784 additions and 785 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const metascraper = require('metascraper')([
| [`metascraper-logo-favicon`](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-logo-favicon) | [![npm](https://img.shields.io/npm/v/metascraper-logo-favicon.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-logo-favicon) | [![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-logo-favicon&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-logo-favicon) |
| [`metascraper-soundcloud`](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-soundcloud) | [![npm](https://img.shields.io/npm/v/metascraper-soundcloud.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-soundcloud) | [![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-soundcloud&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-soundcloud) |
| [`metascraper-youtube`](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-youtube) | [![npm](https://img.shields.io/npm/v/metascraper-youtube.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-youtube) | [![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-youtube&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-youtube) |
| [`metascraper-video-provider`](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-video-provider) | [![npm](https://img.shields.io/npm/v/metascraper-video-provider.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-video-provider) | [![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-video-provider&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-video-provider) |
| [`metascraper-media-provider`](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-media-provider) | [![npm](https://img.shields.io/npm/v/metascraper-media-provider.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-media-provider) | [![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-media-provider&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-media-provider) |

### Write your own rules

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# metascraper-video-provider
# metascraper-media-provider

[![npm](https://img.shields.io/npm/v/metascraper-video-provider.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-video-provider)
[![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-video-provider&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-video-provider)
[![npm](https://img.shields.io/npm/v/metascraper-media-provider.svg?style=flat-square)](https://www.npmjs.com/package/metascraper-media-provider)
[![Dependency Status](https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-media-provider&style=flat-square)](https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-media-provider)

> Get specific video provider url (Facebook/Twitter/Vimeo/etc).
## Install

```bash
$ npm install metascraper-video-provider --save
$ npm install metascraper-media-provider --save
```

## License

**metascraper-video-provider** © [microlink.io](https://microlink.io), Released under the [MIT](https://github.com/microlinkhq//blob/master/LICENSE.md) License.<br>
**metascraper-media-provider** © [microlink.io](https://microlink.io), Released under the [MIT](https://github.com/microlinkhq//blob/master/LICENSE.md) License.<br>
Authored and maintained by microlink.io with help from [contributors](https://github.com/microlinkhq//contributors).

> [microlink.io](https://microlink.io) · GitHub [@microlink.io](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ exports['vimeo 1'] = {
"logo": "https://i.vimeocdn.com/favicon/main-touch_180",
"url": "https://vimeo.com/188175573"
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "metascraper-video-provider",
"name": "metascraper-media-provider",
"description": "Get video property from HTML markup",
"homepage": "https://metascraper.js.org",
"version": "4.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const {isTwitterUrl, getTwitterVideoInfo} = require('./twitter-video-info')
const { isTwitterUrl, getTwitterVideoInfo } = require('./twitter-video-info')
const getVideoInfo = require('./video-info')
const { chain } = require('lodash')

Expand All @@ -15,12 +15,12 @@ const getInfo = async url => {
const formats = chain(videoInfo.formats)
.reduce((acc, format, index) => {
const { url } = twitterVideos[index]
const item = {...format, url}
const item = { ...format, url }
return [...acc, item]
}, [])
.value()

return {...videoInfo, formats}
return { ...videoInfo, formats }
}

// Local cache for successive calls
Expand Down
Loading

0 comments on commit 2838e12

Please sign in to comment.