Skip to content

Commit

Permalink
MediaEmbed: updated example URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Apr 24, 2024
1 parent bf99a93 commit ac0b75e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Plugins/MediaEmbed/Sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</tr>
<tr title="X" id="twitter">
<td><code>twitter</code></td>
<td>https://twitter.com/IJasonAlexander/statuses/1718435734942556494<br/>https://mobile.twitter.com/DerekTVShow/status/463372588690202624<br/>https://twitter.com/#!/IJasonAlexander/status/526635414338023424</td>
<td>https://twitter.com/IJasonAlexander/statuses/526635414338023424<br/>https://mobile.twitter.com/DerekTVShow/status/463372588690202624<br/>https://twitter.com/#!/IJasonAlexander/status/526635414338023424</td>
</tr>
<tr title="Ustream" id="ustream">
<td><code>ustream</code></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class CachedDefinitionCollection extends SiteDefinitionCollection
'tumblr'=>['attributes'=>['did'=>['required'=>true],'key'=>['required'=>true],'name'=>['required'=>true]],'example'=>'https://staff.tumblr.com/post/180624227620/','extract'=>['!(?\'name\'[-\\w]+)\\.tumblr\\.com/post/(?\'id\'\\d+)!','!(?:at|www)\\.tumblr\\.com/(?\'name\'[-\\w]+)/(?\'id\'\\d+)!'],'homepage'=>'https://www.tumblr.com/','host'=>['tumblr.com'],'iframe'=>['data-s9e-livepreview-ignore-attrs'=>'style','height'=>300,'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/tumblr.min.html#{@key}/{@id}','width'=>542],'name'=>'Tumblr','scrape'=>[['extract'=>['!did=(?:\\\\"|\\\\u0022)(?\'did\'[-\\w]+)!','!embed/post/t:(?\'key\'[-\\w]+)!'],'header'=>'User-agent: curl','match'=>['!\\w\\.tumblr\\.com/post/\\d!','!(?:at|www)\\.tumblr\\.com/[-\\w]+/\\d+!'],'url'=>'https://www.tumblr.com/oembed/1.0?url=https://{@name}.tumblr.com/post/{@id}']],'tags'=>['social']],
'twentyfoursevensports'=>['attributes'=>[],'example'=>'https://247sports.com/Player/LeSean-McCoy-25234/','extract'=>['!247sports\\.com/playersport/[-\\w]*?(?\'player_id\'\\d+)/embed!i'],'homepage'=>'https://247sports.com/','host'=>['247sports.com'],'iframe'=>['height'=>152,'onload'=>'let w=this.contentWindow;window.addEventListener(\'message\',e=>{{if(e.source===w&&e.data.height)this.style.height=e.data.height+\'px\'}});w.postMessage(\'\',\'*\')','src'=>'https://247sports.com/playersport/{@player_id}/embed/','width'=>600],'name'=>'247Sports','scrape'=>[['extract'=>['!247sports\\.com/playersport/[-\\w]*?(?\'player_id\'\\d+)/embed!i'],'header'=>'User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36','match'=>['!247sports\\.com/Player/[-\\w]*?\\d!i']]],'tags'=>['sports']],
'twitch'=>['attributes'=>[],'example'=>['https://www.twitch.tv/twitch','https://www.twitch.tv/twitch/v/29415830?t=17m17s','https://www.twitch.tv/videos/29415830?t=17m17s','https://www.twitch.tv/chess/clip/CrepuscularOptimisticEagleOhMyDog-9jMi4oqxK5MN0F0C'],'extract'=>['#twitch\\.tv/(?:videos|\\w+/v)/(?\'video_id\'\\d+)?#','#www\\.twitch\\.tv/(?!videos/)(?\'channel\'\\w+)(?:/clip/(?\'clip_id\'[-\\w]+))?#','#t=(?\'t\'(?:(?:\\d+h)?\\d+m)?\\d+s)#','#clips\\.twitch\\.tv/(?:(?\'channel\'\\w+)/)?(?\'clip_id\'[-\\w]+)#'],'homepage'=>'https://www.twitch.tv/','host'=>['twitch.tv'],'iframe'=>['onload'=>'this.contentWindow.postMessage(\'\',\'*\')','src'=>'https://s9e.github.io/iframe/2/twitch.min.html#channel={@channel};clip_id={@clip_id};t={@t};video_id={@video_id}'],'name'=>'Twitch','scrape'=>[],'source'=>'https://dev.twitch.tv/docs/embed/video-and-clips','tags'=>['gaming','livestreaming']],
'twitter'=>['amp'=>['custom-element'=>'amp-twitter','src'=>'https://cdn.ampproject.org/v0/amp-twitter-0.1.js','template'=>'<amp-twitter layout="responsive" width="550" height="273" data-tweetid="{@id}"><blockquote placeholder=""><a href="https://twitter.com/user/status/{@id}">X</a></blockquote></amp-twitter>'],'attributes'=>[],'example'=>['https://twitter.com/IJasonAlexander/statuses/1718435734942556494','https://mobile.twitter.com/DerekTVShow/status/463372588690202624','https://twitter.com/#!/IJasonAlexander/status/526635414338023424'],'extract'=>['@(?:twitter|x)\\.com/(?:#!/|i/)?\\w+/(?:status(?:es)?|tweet)/(?\'id\'\\d+)@'],'homepage'=>'https://twitter.com/','host'=>['twitter.com','x.com'],'iframe'=>['allow'=>'autoplay *','data-s9e-livepreview-ignore-attrs'=>'style','height'=>350,'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/twitter.min.html#<xsl:value-of select="@id"/><xsl:if test="$MEDIAEMBED_THEME=\'dark\'">#theme=dark</xsl:if>','width'=>550],'name'=>'X','oembed'=>['endpoint'=>'https://publish.twitter.com/oembed','scheme'=>'https://twitter.com/user/status/{@id}'],'scrape'=>[],'tags'=>['social']],
'twitter'=>['amp'=>['custom-element'=>'amp-twitter','src'=>'https://cdn.ampproject.org/v0/amp-twitter-0.1.js','template'=>'<amp-twitter layout="responsive" width="550" height="273" data-tweetid="{@id}"><blockquote placeholder=""><a href="https://twitter.com/user/status/{@id}">X</a></blockquote></amp-twitter>'],'attributes'=>[],'example'=>['https://twitter.com/IJasonAlexander/statuses/526635414338023424','https://mobile.twitter.com/DerekTVShow/status/463372588690202624','https://twitter.com/#!/IJasonAlexander/status/526635414338023424'],'extract'=>['@(?:twitter|x)\\.com/(?:#!/|i/)?\\w+/(?:status(?:es)?|tweet)/(?\'id\'\\d+)@'],'homepage'=>'https://twitter.com/','host'=>['twitter.com','x.com'],'iframe'=>['allow'=>'autoplay *','data-s9e-livepreview-ignore-attrs'=>'style','height'=>350,'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/twitter.min.html#<xsl:value-of select="@id"/><xsl:if test="$MEDIAEMBED_THEME=\'dark\'">#theme=dark</xsl:if>','width'=>550],'name'=>'X','oembed'=>['endpoint'=>'https://publish.twitter.com/oembed','scheme'=>'https://twitter.com/user/status/{@id}'],'scrape'=>[],'tags'=>['social']],
'ustream'=>['attributes'=>[],'choose'=>['otherwise'=>['iframe'=>['src'=>'//www.ustream.tv/embed/{@cid}?html5ui']],'when'=>['iframe'=>['src'=>'//www.ustream.tv/embed/recorded/{@vid}?html5ui'],'test'=>'@vid']],'example'=>['https://www.ustream.tv/channel/ps4-ustream-gameplay','https://www.ustream.tv/baja1000tv','https://www.ustream.tv/recorded/40688256'],'extract'=>['!ustream\\.tv/recorded/(?\'vid\'\\d+)!'],'homepage'=>'https://www.ustream.tv/','host'=>['ustream.tv'],'name'=>'Ustream','scrape'=>[['extract'=>['!embed/(?\'cid\'\\d+)!'],'match'=>['#ustream\\.tv/(?!explore/|platform/|recorded/|search\\?|upcoming$|user/)(?:channel/)?[-\\w]+#']]],'tags'=>['gaming']],
'vbox7'=>['attributes'=>[],'example'=>'https://vbox7.com/play:3975300ec6','extract'=>['!vbox7\\.com/play:(?\'id\'[\\da-f]+)!'],'homepage'=>'https://vbox7.com/','host'=>['vbox7.com'],'iframe'=>['src'=>'//vbox7.com/emb/external.php?vid={@id}'],'name'=>'VBOX7','scrape'=>[],'tags'=>['.bg']],
'veoh'=>['attributes'=>[],'example'=>'https://www.veoh.com/watch/v6335577TeB8kyNR','extract'=>['!veoh\\.com/(?:m/watch\\.php\\?v=|watch/)v(?\'id\'\\w+)!'],'flash'=>['padding-height'=>40,'src'=>'//www.veoh.com/swf/webplayer/WebPlayer.swf?version=AFrontend.5.7.0.1509&permalinkId=v{@id}&player=videodetailsembedded&videoAutoPlay=0&id=anonymous'],'homepage'=>'https://www.veoh.com/','host'=>['veoh.com'],'name'=>'Veoh','scrape'=>[],'tags'=>['videos']],
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/MediaEmbed/Configurator/sites/twitter.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<site name="X" homepage="https://twitter.com/">
<example>https://twitter.com/IJasonAlexander/statuses/1718435734942556494</example>
<example>https://twitter.com/IJasonAlexander/statuses/526635414338023424</example>
<example>https://mobile.twitter.com/DerekTVShow/status/463372588690202624</example>
<example>https://twitter.com/#!/IJasonAlexander/status/526635414338023424</example>

Expand Down

0 comments on commit ac0b75e

Please sign in to comment.