Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class CachedDefinitionCollection extends SiteDefinitionCollection
'googledrive'=>['attributes'=>[],'example'=>'https://drive.google.com/file/d/0B_4NRUjxLBejNjVmeG5MUzA3Q3M/view?usp=sharing','extract'=>['!drive\\.google\\.com/.*?(?:file/d/|id=)(?\'id\'[-\\w]+)!'],'homepage'=>'https://drive.google.com','host'=>['drive.google.com'],'iframe'=>['height'=>480,'src'=>'//drive.google.com/file/d/{@id}/preview','width'=>640],'name'=>'Google Drive','scrape'=>[],'tags'=>['documents','images','videos']],
'googleplus'=>['attributes'=>['name'=>['filterChain'=>['urldecode']]],'example'=>['https://plus.google.com/+TonyHawk/posts/C5TMsDZJWBd','https://plus.google.com/106189723444098348646/posts/V8AojCoTzxV'],'extract'=>['!//plus\\.google\\.com/(?:u/\\d+/)?(?:\\+(?\'name\'[^/]+)|(?\'oid\'\\d+))/posts/(?\'pid\'\\w+)!'],'homepage'=>'https://plus.google.com/','host'=>['plus.google.com'],'iframe'=>['data-s9e-livepreview-ignore-attrs'=>'style','height'=>240,'onload'=>'let c=new MessageChannel;c.port1.onmessage=e=>this.style.height=e.data+\'px\';this.contentWindow.postMessage(\'s9e:init\',\'*\',[c.port2])','src'=>'https://s9e.github.io/iframe/2/googleplus.min.html#<xsl:choose><xsl:when test="@oid"><xsl:value-of select="@oid"/></xsl:when><xsl:otherwise>+<xsl:value-of select="@name"/></xsl:otherwise></xsl:choose>/posts/<xsl:value-of select="@pid"/>','width'=>450],'name'=>'Google+','scrape'=>[],'source'=>'https://developers.google.com/+/web/embedded-post/','tags'=>['social']],
'googlesheets'=>['attributes'=>[],'choose'=>['otherwise'=>['iframe'=>['height'=>500,'src'=>'https://docs.google.com/spreadsheets/d/<xsl:value-of select="@id"/>/p<xsl:choose><xsl:when test="starts-with(@id,\'e/\')">ubhtml?widget=true&amp;headers=false</xsl:when><xsl:otherwise>review</xsl:otherwise></xsl:choose>#gid=<xsl:value-of select="@gid"/>','style'=>['resize'=>'vertical'],'width'=>'100%']],'when'=>['iframe'=>['height'=>372,'src'=>'https://docs.google.com/spreadsheets/d/{@id}/pubchart?oid={@oid}&format=interactive','width'=>600],'test'=>'@type=\'chart\'']],'example'=>['https://docs.google.com/spreadsheets/d/1f988o68HDvk335xXllJD16vxLBuRcmm3vg6U9lVaYpA','https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vQ7iYECa_ziPWygKBf9Og-PkQl5-gdnFRU-jP-z1FyjLfLXMAdRJN1J5Lx31NjnCq5lkRcL-T0Idh4_/pubhtml','https://docs.google.com/spreadsheets/d/e/2PACX-1vSbbciMU7t5dCB8auk-nyK-p-25TJjgUrzBuMCAiq_2ZDqoMSFAlZCctIC7y3TXS71ys_MRdoAU4Jqr/pubchart?oid=1729348495'],'extract'=>['@docs\\.google\\.com/spreadsheet(?:/ccc\\?key=|(?:[^e]/)+)(?\'id\'(?:e/)?[-\\w]+)@','@oid=(?\'oid\'\\d+)@','@#gid=(?\'gid\'\\d+)@','@/pub(?\'type\'chart)@'],'homepage'=>'https://www.google.com/sheets/about/','host'=>['docs.google.com'],'name'=>'Google Sheets','scrape'=>[],'tags'=>['documents']],
'gumlet'=>['attributes'=>[],'example'=>['https://gumlet.tv/watch/69c33353bf49c9eb69bc6506/','https://play.gumlet.io/embed/69c33353bf49c9eb69bc6506'],'extract'=>['!(?:gumlet\\.tv/watch|play\\.gumlet\\.io/embed)/(?\'id\'[0-9a-f]+)!'],'homepage'=>'https://gumlet.tv/','host'=>['gumlet.tv','play.gumlet.io'],'iframe'=>['src'=>'https://play.gumlet.io/embed/{@id}'],'name'=>'Gumlet','scrape'=>[],'tags'=>['videos']],
'hudl'=>['attributes'=>['id'=>['required'=>false]],'example'=>['https://www.hudl.com/video/59dfca6090eeac23f0eef838','https://www.hudl.com/athlete/2067184/highlights/163744377','https://www.hudl.com/video/3/323679/57719969842eb243e47883f8'],'extract'=>['!hudl\\.com/athlete/(?\'athlete\'\\d+)/highlights/(?\'highlight\'[\\da-f]+)!','!hudl\\.com/video/\\d+/(?\'athlete\'\\d+)/(?\'highlight\'[\\da-f]+)!','@hudl\\.com/video/(?\'id\'\\w+)(?![\\w/])@'],'homepage'=>'https://www.hudl.com/','host'=>['hudl.com'],'iframe'=>['src'=>'//www.hudl.com/embed/<xsl:choose><xsl:when test="@id">video/<xsl:value-of select="@id"/></xsl:when><xsl:otherwise>athlete/<xsl:value-of select="@athlete"/>/highlights/<xsl:value-of select="@highlight"/></xsl:otherwise></xsl:choose>'],'name'=>'Hudl','scrape'=>[['extract'=>['!hudl\\.com/video/\\d+/(?\'athlete\'\\d+)/(?\'highlight\'[\\da-f]+)!','@hudl\\.com/video/(?\'id\'\\w+)(?![\\w/])@'],'match'=>['!hudl\\.com/v/!']]],'tags'=>['sports']],
'hulu'=>['attributes'=>[],'example'=>'https://www.hulu.com/watch/484180','extract'=>[],'homepage'=>'https://www.hulu.com/','host'=>['hulu.com'],'iframe'=>['src'=>'https://secure.hulu.com/embed/{@id}'],'name'=>'Hulu','scrape'=>[['extract'=>['!eid=(?\'id\'[-\\w]+)!'],'match'=>['!hulu\\.com/watch/!']]]],
'ign'=>['attributes'=>[],'example'=>'https://www.ign.com/videos/2013/07/12/pokemon-x-version-pokemon-y-version-battle-trailer','extract'=>['!(?\'id\'https?://.*?ign\\.com/videos/.+)!i'],'homepage'=>'https://www.ign.com/videos/','host'=>['ign.com'],'iframe'=>['height'=>263,'src'=>'//widgets.ign.com/video/embed/content.html?url={@id}','width'=>468],'name'=>'IGN','scrape'=>[],'tags'=>['gaming']],
Expand Down Expand Up @@ -108,6 +109,7 @@ class CachedDefinitionCollection extends SiteDefinitionCollection
'sportsnet'=>['attributes'=>[],'example'=>'https://www.sportsnet.ca/soccer/west-ham-2-hull-2/','extract'=>[],'homepage'=>'https://www.sportsnet.ca/','host'=>['sportsnet.ca'],'iframe'=>['src'=>'//players.brightcove.net/1704050871/rkedLxwfab_default/index.html?videoId={@id}'],'name'=>'Sportsnet','scrape'=>[['extract'=>['@bc_videos\\s*:\\s*(?\'id\'\\d+)@'],'match'=>['//']]],'tags'=>['.ca','sports']],
'spotify'=>['attributes'=>[],'example'=>['https://open.spotify.com/user/ryan.lloyd.french/playlist/4jHNeLTj7CnL5JwZzmnqOL','https://open.spotify.com/track/3CPjqkaMwrbht1lJpELoY0?si=K7cm7-dWTR6U7BjDn1oP7g','https://open.spotify.com/episode/4zhSJwkVdndcVvwCypfl9b'],'extract'=>['!(?:open|play)\\.spotify\\.com/(?:intl-\\w+/|user/[-.\\w]+/)*(?\'id\'(?:album|artist|episode|playlist|show|track)(?:[:/][-.\\w]+)+)!'],'homepage'=>'https://www.spotify.com/','host'=>['link.tospotify.com','open.spotify.com','play.spotify.com','spotify.link'],'iframe'=>['allow'=>'encrypted-media','height'=>'<xsl:choose><xsl:when test="starts-with(@id,\'episode\')or starts-with(@id,\'show\')or starts-with(@id,\'track\')">152</xsl:when><xsl:otherwise>380</xsl:otherwise></xsl:choose>','max-width'=>900,'src'=>'https://open.spotify.com/embed/{translate(@id,\':\',\'/\')}{@path}','style'=>['border-radius'=>'12px'],'width'=>'100%'],'name'=>'Spotify','scrape'=>[['extract'=>['!(?:open|play)\\.spotify\\.com/(?:intl-\\w+/|user/[-.\\w]+/)*(?\'id\'(?:album|artist|episode|playlist|show|track)(?:[:/][-.\\w]+)+)!'],'header'=>'User-agent: PHP (not Mozilla)','match'=>['!https?://(?:link\\.tospotify\\.com|spotify\\.link)/.!']]],'source'=>'https://developer.spotify.com/technologies/widgets/spotify-play-button/','tags'=>['music','podcasts']],
'spreaker'=>['attributes'=>[],'choose'=>['otherwise'=>['iframe'=>['height'=>400,'max-width'=>900,'src'=>'https://widget.spreaker.com/player?episode_id={@episode_id}&show_id={@show_id}&theme={$MEDIAEMBED_THEME}','width'=>'100%']],'when'=>['iframe'=>['height'=>200,'max-width'=>900,'src'=>'https://widget.spreaker.com/player?episode_id={@episode_id}&show_id={@show_id}&theme={$MEDIAEMBED_THEME}','width'=>'100%'],'test'=>'@episode_id']],'example'=>['https://www.spreaker.com/show/a-ha-ranking-highs-and-lows','https://www.spreaker.com/user/15738288/stabbing-final_1'],'extract'=>['!spreaker\\.com/episode/(?\'episode_id\'\\d+)!'],'homepage'=>'https://www.spreaker.com','host'=>['spreaker.com'],'name'=>'Spreaker','scrape'=>[['extract'=>['!episode_id=(?\'episode_id\'\\d+)!','!show_id=(?\'show_id\'\\d+)!'],'match'=>['!spreaker\\.com/(?:show|user)/.!']]],'tags'=>['podcasts']],
'sproutvideo'=>['attributes'=>[],'example'=>'https://videos.sproutvideo.com/embed/8c9bd3b4111ee5cb06/ceed13c50e173bb7','extract'=>['!videos\\.sproutvideo\\.com/embed/(?\'id\'[0-9a-f]+)/(?\'token\'[0-9a-f]+)!'],'homepage'=>'https://sproutvideo.com/','host'=>['videos.sproutvideo.com','sproutvideo.com'],'iframe'=>['height'=>360,'src'=>'https://videos.sproutvideo.com/embed/{@id}/{@token}','width'=>640],'name'=>'SproutVideo','scrape'=>[],'tags'=>['videos']],
'steamstore'=>['attributes'=>[],'example'=>'https://store.steampowered.com/app/250520/','extract'=>['!store.steampowered.com/app/(?\'id\'\\d+)!'],'homepage'=>'https://store.steampowered.com/','host'=>['store.steampowered.com'],'iframe'=>['height'=>190,'max-width'=>900,'src'=>'//store.steampowered.com/widget/{@id}','width'=>'100%'],'name'=>'Steam store','scrape'=>[],'tags'=>['gaming']],
'strawpoll'=>['attributes'=>[],'example'=>'https://strawpoll.me/738091','extract'=>['!strawpoll\\.me/(?\'id\'\\d+)!'],'homepage'=>'https://strawpoll.me/','host'=>['strawpoll.me'],'iframe'=>['scrolling'=>'','src'=>'//www.strawpoll.me/embed_1/{@id}'],'name'=>'Straw Poll','scrape'=>[]],
'streamable'=>['attributes'=>[],'example'=>'https://streamable.com/e4d','extract'=>['!streamable\\.com/(?:e/)?(?\'id\'\\w+)!'],'homepage'=>'https://streamable.com/','host'=>['streamable.com'],'iframe'=>['src'=>'//streamable.com/e/{@id}'],'name'=>'Streamable','oembed'=>['endpoint'=>'https://api.streamable.com/oembed.json','scheme'=>'https://streamable.com/{@id}'],'scrape'=>[],'source'=>'https://support.streamable.com/article/46-streamable-api','tags'=>['videos']],
Expand Down
11 changes: 11 additions & 0 deletions src/Plugins/MediaEmbed/Configurator/sites/gumlet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<site name="Gumlet" homepage="https://gumlet.tv/">
<example>https://gumlet.tv/watch/69c33353bf49c9eb69bc6506/</example>
<example>https://play.gumlet.io/embed/69c33353bf49c9eb69bc6506</example>

<tags><tag>videos</tag></tags>

<host>gumlet.tv</host>
<host>play.gumlet.io</host>
<extract>!(?:gumlet\.tv/watch|play\.gumlet\.io/embed)/(?'id'[0-9a-f]+)!</extract>
<iframe src="https://play.gumlet.io/embed/{@id}"/>
</site>
10 changes: 10 additions & 0 deletions src/Plugins/MediaEmbed/Configurator/sites/sproutvideo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<site name="SproutVideo" homepage="https://sproutvideo.com/">
<example>https://videos.sproutvideo.com/embed/8c9bd3b4111ee5cb06/ceed13c50e173bb7</example>

<tags><tag>videos</tag></tags>

<host>videos.sproutvideo.com</host>
<host>sproutvideo.com</host>
<extract>!videos\.sproutvideo\.com/embed/(?'id'[0-9a-f]+)/(?'token'[0-9a-f]+)!</extract>
<iframe width="640" height="360" src="https://videos.sproutvideo.com/embed/{@id}/{@token}"/>
</site>
27 changes: 27 additions & 0 deletions tests/Plugins/MediaEmbed/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,24 @@ function ($configurator)
$configurator->MediaEmbed->add('googlesheets');
}
],
[
'https://gumlet.tv/watch/69c33353bf49c9eb69bc6506/',
'<r><GUMLET id="69c33353bf49c9eb69bc6506">https://gumlet.tv/watch/69c33353bf49c9eb69bc6506/</GUMLET></r>',
[],
function ($configurator)
{
$configurator->MediaEmbed->add('gumlet');
}
],
[
'https://play.gumlet.io/embed/69c33353bf49c9eb69bc6506',
'<r><GUMLET id="69c33353bf49c9eb69bc6506">https://play.gumlet.io/embed/69c33353bf49c9eb69bc6506</GUMLET></r>',
[],
function ($configurator)
{
$configurator->MediaEmbed->add('gumlet');
}
],
[
'http://www.hudl.com/athlete/2067184/highlights/163744377',
'<r><HUDL athlete="2067184" highlight="163744377">http://www.hudl.com/athlete/2067184/highlights/163744377</HUDL></r>',
Expand Down Expand Up @@ -3397,6 +3415,15 @@ function ($configurator)
$configurator->MediaEmbed->add('spreaker');
}
],
[
'https://videos.sproutvideo.com/embed/8c9bd3b4111ee5cb06/ceed13c50e173bb7',
'<r><SPROUTVIDEO id="8c9bd3b4111ee5cb06" token="ceed13c50e173bb7">https://videos.sproutvideo.com/embed/8c9bd3b4111ee5cb06/ceed13c50e173bb7</SPROUTVIDEO></r>',
[],
function ($configurator)
{
$configurator->MediaEmbed->add('sproutvideo');
}
],
[
'http://store.steampowered.com/app/517160/',
'<r><STEAMSTORE id="517160">http://store.steampowered.com/app/517160/</STEAMSTORE></r>',
Expand Down