# videos

## Table of Contents

- [Options](#options)
- [Examples](#examples)

---

Sweeps `video` elements and their `source` children, returning each `src` as an absolute, deduped URL:

```js
constvideos=awaitmicrolink.videos('https://example.com')
```

## Options

Override the default rule of `selectorAll: ['video[src]', 'video source[src]']`, `attr: 'src'`, and `type: 'url'` with [selectorAll](https://microlink.io/docs/sdk/methods/extract/selectorAll), [selector](https://microlink.io/docs/sdk/methods/extract/selector), [attr](https://microlink.io/docs/sdk/methods/extract/attr), or [type](https://microlink.io/docs/sdk/methods/extract/type).

## Examples

Only the videos inside the article body:

```js
constvideos=awaitmicrolink.videos('https://example.com/post',{

selectorAll:'article video source'

})
```

Poster images instead of the sources:

```js
constposters=awaitmicrolink.videos('https://example.com',{

selectorAll:'video[poster]',

attr:'poster'

})
```

This sweeps the markup; a YouTube or Vimeo page has no `video` element with a direct source. For the primary video of such a page, resolved through the provider, use [video](https://microlink.io/docs/sdk/methods/video).