-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
862 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict' | ||
|
||
const test = require('ava') | ||
|
||
const { metascraper } = require('../helpers') | ||
|
||
test('from file url content type', async t => { | ||
const url = | ||
'https://app.croct.dev/assets/workspace/customer-assets/9d97037d-64a2-4c25-b443-bfc2972f3c9e/a0442e2b-a384-4f2b-b443-9f34c2215e16' | ||
|
||
const metadata = await metascraper({ url }) | ||
|
||
t.is( | ||
metadata.video, | ||
'https://app.croct.dev/assets/workspace/customer-assets/9d97037d-64a2-4c25-b443-bfc2972f3c9e/a0442e2b-a384-4f2b-b443-9f34c2215e16' | ||
) | ||
}) | ||
|
||
test('from file url extension', async t => { | ||
const metadata = await metascraper({ | ||
url: 'https://cdn-microlink.vercel.app/file-examples/sample.mp4' | ||
}) | ||
|
||
t.is( | ||
metadata.video, | ||
'https://cdn-microlink.vercel.app/file-examples/sample.mp4' | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,021 changes: 534 additions & 487 deletions
1,021
packages/metascraper-video/test/fixtures/providers/bluecadet.com.html
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/metascraper-video/test/fixtures/video-type-relative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>a0442e2b-a384-4f2b-b443-9f34c2215e16</title> | ||
<meta property="og:site_name" content="croct.dev"> | ||
<meta name="date" content="2023-08-04T21:10:56.000Z"> | ||
<link rel="canonical" href="https://app.croct.dev/assets/workspace/customer-assets/9d97037d-64a2-4c25-b443-bfc2972f3c9e/a0442e2b-a384-4f2b-b443-9f34c2215e16"> | ||
</head> | ||
|
||
<body><video> | ||
<source src="video.mp4" type="video/mp4"> | ||
</video></body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>a0442e2b-a384-4f2b-b443-9f34c2215e16</title> | ||
<meta property="og:site_name" content="croct.dev"> | ||
<meta name="date" content="2023-08-04T21:10:56.000Z"> | ||
<link rel="canonical" href="https://app.croct.dev/assets/workspace/customer-assets/9d97037d-64a2-4c25-b443-bfc2972f3c9e/a0442e2b-a384-4f2b-b443-9f34c2215e16"> | ||
</head> | ||
|
||
<body><video> | ||
<source autoplay="" src="https://app.croct.dev/assets/workspace/customer-assets/9d97037d-64a2-4c25-b443-bfc2972f3c9e/a0442e2b-a384-4f2b-b443-9f34c2215e16" type="video/mp4"> | ||
<source src="https://app.croct.dev/assets/workspace/customer-assets/9d97037d-64a2-4c25-b443-bfc2972f3c9e/a0442e2b-a384-4f2b-b443-9f34c2215e16" type="video/mp4"> | ||
</video></body> | ||
|
||
</html> |
Oops, something went wrong.