Skip to content

Commit 05febbb

Browse files
committed
MediaEmbed: updated Threads
1 parent 303959a commit 05febbb

File tree

5 files changed

+38
-37
lines changed

5 files changed

+38
-37
lines changed

docs/Plugins/MediaEmbed/Sites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@
423423
</tr>
424424
<tr title="Threads" id="threads">
425425
<td><code>threads</code></td>
426-
<td>https://www.threads.net/t/CuY2OYEAbJw</td>
426+
<td>https://www.threads.com/t/CuY2OYEAbJw</td>
427427
</tr>
428428
<tr title="TikTok" id="tiktok">
429429
<td><code>tiktok</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: 3 additions & 3 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
@@ -115,7 +115,7 @@ class CachedDefinitionCollection extends SiteDefinitionCollection
115115
'theatlantic'=>['attributes'=>[],'example'=>'https://www.theatlantic.com/video/index/358928/computer-vision-syndrome-and-you/','extract'=>['!theatlantic\\.com/video/index/(?\'id\'\\d+)!'],'homepage'=>'https://www.theatlantic.com/video/','host'=>['theatlantic.com'],'iframe'=>['src'=>'//www.theatlantic.com/video/iframe/{@id}/'],'name'=>'The Atlantic Video','scrape'=>[],'tags'=>['news']],
116116
'theguardian'=>['attributes'=>[],'example'=>'https://www.theguardian.com/world/video/2016/apr/07/tokyos-hedgehog-cafe-encourages-you-to-embrace-prickly-pets-video','extract'=>['!theguardian\\.com/(?\'id\'\\w+/video/20(?:0[0-9]|1[0-7])[-/\\w]+)!'],'homepage'=>'https://www.theguardian.com/video','host'=>['theguardian.com'],'iframe'=>['src'=>'//embed.theguardian.com/embed/video/{@id}'],'name'=>'The Guardian (obsolete)','scrape'=>[],'tags'=>['news']],
117117
'theonion'=>['attributes'=>[],'example'=>['https://www.theonion.com/video/nation-successfully-completes-mothers-day-by-918-a,35998/','https://www.theonion.com/video/the-onion-reviews-avengers-age-of-ultron-38524'],'extract'=>['!theonion\\.com/video/[-\\w]+[-,](?\'id\'\\d+)!'],'homepage'=>'https://www.theonion.com/video/','host'=>['theonion.com'],'iframe'=>['src'=>'//www.theonion.com/video_embed/?id={@id}'],'name'=>'The Onion','scrape'=>[],'tags'=>['entertainment']],
118-
'threads'=>['attributes'=>[],'example'=>'https://www.threads.net/t/CuY2OYEAbJw','extract'=>['!threads\\.net/(?:@[-\\w.]+/pos)?t/(?\'id\'[-\\w]+)!'],'homepage'=>'https://www.threads.net/','host'=>['threads.net'],'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/threads.min.html#{@id}','width'=>550],'name'=>'Threads','scrape'=>[],'tags'=>['social']],
118+
'threads'=>['attributes'=>[],'example'=>'https://www.threads.com/t/CuY2OYEAbJw','extract'=>['!threads\\.(?:com|net)/(?:@[-\\w.]+/pos)?t/(?\'id\'[-\\w]+)!'],'homepage'=>'https://www.threads.com/','host'=>['threads.com','threads.net'],'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/threads.min.html#{@id}','width'=>550],'name'=>'Threads','scrape'=>[],'tags'=>['social']],
119119
'tiktok'=>['attributes'=>[],'example'=>'https://www.tiktok.com/@lauren.feagans/video/6789430799839104261','extract'=>['#tiktok\\.com/(?:@[.\\w]+/video|v|(?:i18n/)?share/video)/(?\'id\'\\d+)#'],'homepage'=>'https://www.tiktok.com','host'=>['tiktok.com'],'iframe'=>['data-s9e-livepreview-ignore-attrs'=>'style','height'=>740,'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/tiktok.min.html#{@id}','width'=>325],'name'=>'TikTok','oembed'=>['endpoint'=>'https://www.tiktok.com/oembed','scheme'=>'https://www.tiktok.com/video/{@id}'],'scrape'=>[['extract'=>['#tiktok\\.com/(?:@[.\\w]+/video|v|(?:i18n/)?/share/video)/(?\'id\'\\d+)#'],'match'=>['#//v[mt]\\.tiktok\\.com/(?\'short_id\'\\w+)#','#tiktok\\.com/t/(?\'short_id\'\\w+)#'],'url'=>'https://www.tiktok.com/t/{@short_id}']],'tags'=>['videos']],
120120
'tmz'=>['attributes'=>[],'example'=>'https://www.tmz.com/videos/0_2pr9x3rb/','extract'=>['@tmz\\.com/videos/(?\'id\'\\w+)@'],'homepage'=>'https://www.tmz.com/videos','host'=>['tmz.com'],'iframe'=>['src'=>'//www.kaltura.com/index.php/kwidget/cache_st/133592691/wid/_591531/partner_id/591531/uiconf_id/9071262/entry_id/{@id}'],'name'=>'TMZ','scrape'=>[],'tags'=>['gossip']],
121121
'tradingview'=>['attributes'=>[],'example'=>['https://www.tradingview.com/symbols/NASDAQ-AAPL/','https://www.tradingview.com/chart/US30/Yro4JNSD-us30/'],'extract'=>['!tradingview\\.com/(?:chart/[^/]+|i)/(?\'chart\'\\w+)!','!tradingview\\.com/symbols/(?\'symbol\'[-:\\w]+)!'],'homepage'=>'https://www.tradingview.com/','host'=>['tradingview.com'],'iframe'=>['height'=>400,'src'=>'https://s.tradingview.com/<xsl:choose><xsl:when test="@symbol">widgetembed/?interval=D&amp;symbol=<xsl:value-of select="translate(@symbol,\'-\',\':\')"/></xsl:when><xsl:otherwise>embed/<xsl:value-of select="@chart"/></xsl:otherwise></xsl:choose>','width'=>'100%'],'name'=>'TradingView','scrape'=>[],'tags'=>['finance']],
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<site name="Threads" homepage="https://www.threads.net/">
2-
<example>https://www.threads.net/t/CuY2OYEAbJw</example>
1+
<site name="Threads" homepage="https://www.threads.com/">
2+
<example>https://www.threads.com/t/CuY2OYEAbJw</example>
33

44
<tags><tag>social</tag></tags>
55

6+
<host>threads.com</host>
67
<host>threads.net</host>
7-
<extract>!threads\.net/(?:@[-\w.]+/pos)?t/(?'id'[-\w]+)!</extract>
8+
<extract>!threads\.(?:com|net)/(?:@[-\w.]+/pos)?t/(?'id'[-\w]+)!</extract>
89
<iframe width="550" height="300" src="https://s9e.github.io/iframe/2/threads.min.html#{@id}" onload="let c=new MessageChannel;c.port1.onmessage=e=>this.style.height=e.data+'px';this.contentWindow.postMessage('s9e:init','*',[c.port2])" data-s9e-livepreview-ignore-attrs="style"/>
910
</site>

0 commit comments

Comments
 (0)