Skip to content

Commit

Permalink
Fix OEmbed for X.com (Twitter)
Browse files Browse the repository at this point in the history
  • Loading branch information
snapeuh authored Jul 24, 2024
1 parent 09a60be commit d331ede
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ExtractorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ExtractorFactory
'twitch.tv' => Adapters\Twitch\Extractor::class,
'bandcamp.com' => Adapters\Bandcamp\Extractor::class,
'twitter.com' => Adapters\Twitter\Extractor::class,
'x.com' => Adapters\Twitter\Extractor::class,
];
private array $customDetectors = [];
private array $settings;
Expand Down
3 changes: 3 additions & 0 deletions src/resources/oembed.php
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,9 @@
'|^https?://twitter\\.com/.*$|i',
'|^https?://twitter\\.com/.*/status/.*$|i',
'|^https?://.*\\.twitter\\.com/.*/status/.*$|i',
'|^https?://x\\.com/.*$|i',
'|^https?://x\\.com/.*/status/.*$|i',
'|^https?://.*\\.x\\.com/.*/status/.*$|i',
],
'https://play.typecast.ai/oembed' => [
'|^https?://play\\.typecast\\.ai/s/.*$|i',
Expand Down

0 comments on commit d331ede

Please sign in to comment.