Skip to content

Commit cb1368c

Browse files
committed
MediaEmbed: updated Rumble
1 parent ce6eaaa commit cb1368c

File tree

5 files changed

+40
-39
lines changed

5 files changed

+40
-39
lines changed

docs/Plugins/MediaEmbed/Sites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
</tr>
348348
<tr title="Rumble" id="rumble">
349349
<td><code>rumble</code></td>
350-
<td>https://rumble.com/vaxo02-i-cant-climb-.html</td>
350+
<td>https://rumble.com/vaxo02-i-cant-climb-.html<br/>https://rumble.com/embed/v8bhte/</td>
351351
</tr>
352352
<tr title="Rutube" id="rutube">
353353
<td><code>rutube</code></td>

docs/testdox.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8002,39 +8002,39 @@ Unparser (s9e\TextFormatter\Tests\Unparser)
80028002
[x] Characters outside Unicode's BMP are decoded
80038003

80048004
Cached (s9e\TextFormatter\Tests\Utils\Http\Clients\Cached)
8005-
[x] Settings from the proxied client are copied
8006-
[x] Settings from the caching client are copied to the proxied client
8007-
[x] Can work without a cache dir
8008-
[x] Works with a cache
8009-
[x] Uses gzip by default if ext/zlib is availble
8010-
[x] Sends custom headers
8011-
[x] Resets custom headers between requests
8012-
[x] post() sends the request body if set
8013-
[x] post() sends no request body if not set
8014-
[x] post() automatically sets Content-Length if a request body is set
8015-
[x] get() returns the response error
8016-
[x] get() returns headers if returnHeaders is true
8005+
[ ] Settings from the proxied client are copied
8006+
[ ] Settings from the caching client are copied to the proxied client
8007+
[ ] Can work without a cache dir
8008+
[ ] Works with a cache
8009+
[ ] Uses gzip by default if ext/zlib is availble
8010+
[ ] Sends custom headers
8011+
[ ] Resets custom headers between requests
8012+
[ ] post() sends the request body if set
8013+
[ ] post() sends no request body if not set
8014+
[ ] post() automatically sets Content-Length if a request body is set
8015+
[ ] get() returns the response error
8016+
[ ] get() returns headers if returnHeaders is true
80178017

80188018
Curl (s9e\TextFormatter\Tests\Utils\Http\Clients\Curl)
8019-
[x] Uses gzip by default if ext/zlib is availble
8020-
[x] Sends custom headers
8021-
[x] Resets custom headers between requests
8022-
[x] post() sends the request body if set
8023-
[x] post() sends no request body if not set
8024-
[x] post() automatically sets Content-Length if a request body is set
8025-
[x] get() returns the response error
8026-
[x] get() returns headers if returnHeaders is true
8019+
[ ] Uses gzip by default if ext/zlib is availble
8020+
[ ] Sends custom headers
8021+
[ ] Resets custom headers between requests
8022+
[ ] post() sends the request body if set
8023+
[ ] post() sends no request body if not set
8024+
[ ] post() automatically sets Content-Length if a request body is set
8025+
[ ] get() returns the response error
8026+
[ ] get() returns headers if returnHeaders is true
80278027

80288028
Native (s9e\TextFormatter\Tests\Utils\Http\Clients\Native)
8029-
[x] Does not send "Accept-Encoding: gzip" if gzip is disabled
8030-
[x] Uses gzip by default if ext/zlib is availble
8031-
[x] Sends custom headers
8032-
[x] Resets custom headers between requests
8033-
[x] post() sends the request body if set
8034-
[x] post() sends no request body if not set
8035-
[x] post() automatically sets Content-Length if a request body is set
8036-
[x] get() returns the response error
8037-
[x] get() returns headers if returnHeaders is true
8029+
[ ] Does not send "Accept-Encoding: gzip" if gzip is disabled
8030+
[ ] Uses gzip by default if ext/zlib is availble
8031+
[ ] Sends custom headers
8032+
[ ] Resets custom headers between requests
8033+
[ ] post() sends the request body if set
8034+
[ ] post() sends no request body if not set
8035+
[ ] post() automatically sets Content-Length if a request body is set
8036+
[ ] get() returns the response error
8037+
[ ] get() returns headers if returnHeaders is true
80388038

80398039
Http (s9e\TextFormatter\Tests\Utils\Http)
80408040
[x] getClient() returns an instance of s9e\TextFormatter\Utils\Http\Client

src/Bundles/MediaPack.php

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

src/Plugins/MediaEmbed/Configurator/Collections/CachedDefinitionCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class CachedDefinitionCollection extends SiteDefinitionCollection
9696
'podbean'=>['attributes'=>[],'example'=>['https://dialhforheroclix.podbean.com/e/dial-h-for-heroclix-episode-46-all-ya-need-is-love/','https://www.podbean.com/ew/pb-gmyyz-d6e065'],'extract'=>['!podbean\\.com/(?:[-\\w]+/)*(?:player[-\\w]*/|\\w+/pb-)(?\'id\'[-\\w]+)!'],'homepage'=>'https://www.podbean.com/','host'=>['podbean.com'],'iframe'=>['height'=>150,'max-width'=>900,'src'=>'https://www.podbean.com/player-v2/?i={@id}','width'=>'100%'],'name'=>'Podbean','scrape'=>[['extract'=>['!podbean\\.com/player[^/]*/\\?i=(?\'id\'[-\\w]+)!'],'header'=>'User-agent: PHP (not Mozilla)','match'=>['@podbean\\.com/(?:media/shar)?e/(?!pb-)@']]],'tags'=>['podcasts']],
9797
'prezi'=>['attributes'=>[],'example'=>'https://prezi.com/5ye8po_hmikp/10-most-common-rookie-presentation-mistakes/','extract'=>['#//prezi\\.com/(?!(?:a(?:bout|mbassadors)|c(?:o(?:llaborate|mmunity|ntact)|reate)|exp(?:erts|lore)|ip(?:ad|hone)|jobs|l(?:ear|ogi)n|m(?:ac|obility)|pr(?:es(?:s|ent)|icing)|recommend|support|user|windows|your)/)(?\'id\'\\w+)/#'],'homepage'=>'https://prezi.com/','host'=>['prezi.com'],'iframe'=>['height'=>400,'src'=>'//prezi.com/embed/{@id}/','width'=>550],'name'=>'Prezi','scrape'=>[],'tags'=>['presentations']],
9898
'reddit'=>['amp'=>['custom-element'=>'amp-reddit','src'=>'https://cdn.ampproject.org/v0/amp-reddit-0.1.js','template'=>'<amp-reddit layout="responsive" width="450" height="300" data-embedtype="post" data-src="https://www.reddit.com/r/{@id}/"/>'],'attributes'=>[],'example'=>['https://www.reddit.com/r/pics/comments/9wp1qg/my_mom_recently_started_watercolor_painting_and/','https://www.reddit.com/r/pics/comments/9wp1qg/my_mom_recently_started_watercolor_painting_and/e9m6pn9/'],'extract'=>['!(?\'id\'\\w+/comments/\\w+(?:/\\w+/\\w+)?)!'],'homepage'=>'https://www.reddit.com/','host'=>['reddit.com'],'iframe'=>['data-s9e-livepreview-ignore-attrs'=>'style','height'=>165,'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/reddit.min.html#{@id}{@path}#theme={$MEDIAEMBED_THEME}','width'=>800],'name'=>'Reddit threads and comments','scrape'=>[['extract'=>['!(?\'id\'\\w+/comments/\\w+(?:/\\w+/\\w+)?)!'],'header'=>'User-agent: FreeBSD/11.0 Lynx/56','match'=>['!reddit\\.com/r/[^/]+/s/\\w!']]],'source'=>'https://www.reddit.com/wiki/embeds','tags'=>['social']],
99-
'rumble'=>['attributes'=>[],'example'=>'https://rumble.com/vaxo02-i-cant-climb-.html','extract'=>['!rumble\\.com/embed/(?\'id\'\\w+)!'],'homepage'=>'https://rumble.com/','host'=>['rumble.com'],'iframe'=>['src'=>'https://rumble.com/embed/{@id}/'],'name'=>'Rumble','oembed'=>['endpoint'=>'https://rumble.com/api/Media/oembed.json','scheme'=>'https://rumble.com/embed/{@id}/'],'scrape'=>[['extract'=>['!video"?:"(?\'id\'\\w+)!'],'match'=>['#rumble\\.com/(?!embed/).#']]],'tags'=>['videos']],
99+
'rumble'=>['attributes'=>[],'example'=>['https://rumble.com/vaxo02-i-cant-climb-.html','https://rumble.com/embed/v8bhte/'],'extract'=>['!rumble\\.com/embed/(?\'id\'\\w+)!'],'homepage'=>'https://rumble.com/','host'=>['rumble.com'],'iframe'=>['src'=>'https://rumble.com/embed/{@id}/'],'name'=>'Rumble','oembed'=>['endpoint'=>'https://rumble.com/api/Media/oembed.json','scheme'=>'https://rumble.com/embed/{@id}/'],'scrape'=>[['extract'=>['!(?:/|%2F)embed(?:/|%2F)(?\'id\'\\w+)!'],'match'=>['#rumble\\.com/(?!embed/).#']]],'tags'=>['videos']],
100100
'rutube'=>['attributes'=>[],'example'=>'https://rutube.ru/video/0771e73d1d10eee9c43ce31decc1dfce/','extract'=>['!rutube\\.ru/(?:play/embed/|tracks/.*?v=|video/)(?\'id\'\\w+)!'],'homepage'=>'https://rutube.ru/','host'=>['rutube.ru'],'iframe'=>['src'=>'//rutube.ru/play/embed/{@id}'],'name'=>'Rutube','oembed'=>['endpoint'=>'https://rutube.ru/api/oembed/','scheme'=>'https://rutube.ru/video/{@id}/'],'scrape'=>[],'tags'=>['.ru']],
101101
'scribd'=>['attributes'=>[],'example'=>['https://www.scribd.com/doc/237147661/Calculus-2-Test-1-Review','https://www.scribd.com/presentation/324333881/600-1450-World-History-Jeopardy'],'extract'=>['!scribd\\.com/(?:mobile/)?(?:doc(?:ument)?|presentation)/(?\'id\'\\d+)!'],'homepage'=>'https://www.scribd.com/','host'=>['scribd.com'],'iframe'=>['height'=>500,'src'=>'https://www.scribd.com/embeds/{@id}/content?view_mode=scroll&show_recommendations=false','style'=>['resize'=>'vertical'],'width'=>'100%'],'name'=>'Scribd','scrape'=>[],'tags'=>['documents','presentations']],
102102
'sendvid'=>['attributes'=>[],'example'=>'https://sendvid.com/w99u3jjp','extract'=>['!sendvid\\.com/(?\'id\'\\w+)!'],'homepage'=>'https://www.sendvid.com/','host'=>['sendvid.com'],'iframe'=>['src'=>'//sendvid.com/embed/{@id}'],'name'=>'Sendvid','scrape'=>[],'tags'=>['videos']],

src/Plugins/MediaEmbed/Configurator/sites/rumble.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<site name="Rumble" homepage="https://rumble.com/">
22
<example>https://rumble.com/vaxo02-i-cant-climb-.html</example>
3+
<example>https://rumble.com/embed/v8bhte/</example>
34

45
<oembed endpoint="https://rumble.com/api/Media/oembed.json"
56
scheme="https://rumble.com/embed/{@id}/"/>
@@ -10,7 +11,7 @@
1011
<extract>!rumble\.com/embed/(?'id'\w+)!</extract>
1112
<scrape>
1213
<match>#rumble\.com/(?!embed/).#</match>
13-
<extract>!video"?:"(?'id'\w+)!</extract>
14+
<extract>!(?:/|%2F)embed(?:/|%2F)(?'id'\w+)!</extract>
1415
</scrape>
1516
<iframe src="https://rumble.com/embed/{@id}/"/>
1617
</site>

0 commit comments

Comments
 (0)