Skip to content

Commit 3a56bc2

Browse files
authored
Merge pull request #540 from snapeuh/master
Fix OEmbed for X.com (Twitter)
2 parents 09a60be + d331ede commit 3a56bc2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ExtractorFactory.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ExtractorFactory
3030
'twitch.tv' => Adapters\Twitch\Extractor::class,
3131
'bandcamp.com' => Adapters\Bandcamp\Extractor::class,
3232
'twitter.com' => Adapters\Twitter\Extractor::class,
33+
'x.com' => Adapters\Twitter\Extractor::class,
3334
];
3435
private array $customDetectors = [];
3536
private array $settings;

src/resources/oembed.php

+3
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,9 @@
10981098
'|^https?://twitter\\.com/.*$|i',
10991099
'|^https?://twitter\\.com/.*/status/.*$|i',
11001100
'|^https?://.*\\.twitter\\.com/.*/status/.*$|i',
1101+
'|^https?://x\\.com/.*$|i',
1102+
'|^https?://x\\.com/.*/status/.*$|i',
1103+
'|^https?://.*\\.x\\.com/.*/status/.*$|i',
11011104
],
11021105
'https://play.typecast.ai/oembed' => [
11031106
'|^https?://play\\.typecast\\.ai/s/.*$|i',

0 commit comments

Comments
 (0)