Skip to content
This repository was archived by the owner on Oct 19, 2019. It is now read-only.

Commit d0844d7

Browse files
committed
source-scraper-jwplayer-runner: Fixes #8
Now checking more properties of jwplayerconfig which could contain the sources.
1 parent 9571af5 commit d0844d7

File tree

2 files changed

+71
-4
lines changed

2 files changed

+71
-4
lines changed

packages/source-scraper-jwplayer-runner/lib/JWPlayerRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class JWPlayerRunner<T> extends Runner<T, IJWPlayerRunnerOptions, IJWPlay
137137
const { page } = args;
138138
const jwplayer = await page.evaluateHandle('jwplayer()');
139139
const config = await page.evaluate(player => player.getConfig(), jwplayer);
140-
const sources = config.sources;
140+
const sources = config.playlist || [config.playlistItem] || [config];
141141
const poster = config.image;
142142
try {
143143
return scraper({

packages/source-scraper-jwplayer-runner/package-lock.json

Lines changed: 70 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)