Skip to content

Commit d5e6ce1

Browse files
committed
fixed scribd oembed
1 parent ac7043e commit d5e6ce1

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/Providers/OEmbed/Scribd.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,24 @@ public static function getEndPoint(Url $url)
1414
return 'http://www.scribd.com/services/oembed';
1515
}
1616

17+
/**
18+
* {@inheritdoc}
19+
*/
20+
public static function getParams(Url $url)
21+
{
22+
return [
23+
'url' => $url->createUrl()->withDirectoryPosition(0, 'doc')->getUrl(),
24+
];
25+
}
26+
1727
/**
1828
* {@inheritdoc}
1929
*/
2030
public static function getPatterns()
2131
{
22-
return ['https?://www.scribd.com/doc/*'];
32+
return [
33+
'https?://www.scribd.com/doc/*',
34+
'https?://www.scribd.com/document/*',
35+
];
2336
}
2437
}

tests/ScribdTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ public function testOne()
88
'http://www.scribd.com/doc/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests',
99
[
1010
'title' => 'Synthesis of Knowledge: Effects of Fire and Thinning Treatments on Understory Vegetation in Dry U.S. Forests',
11-
'imageWidth' => 768,
12-
'imageHeight' => 1024,
1311
'type' => 'rich',
1412
'authorName' => 'Joint Fire Science Program',
1513
'authorUrl' => 'https://www.scribd.com/user/151878975/Joint-Fire-Science-Program',

0 commit comments

Comments
 (0)