From 2a8023dde41e30e3f453911aa49a3ecbf846e80d Mon Sep 17 00:00:00 2001 From: Angel Torres Date: Thu, 28 Jan 2021 17:50:08 -0500 Subject: [PATCH] Support for Instagram TV. Fix issue #279. --- src/Pass/InstagramTransformPass.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Pass/InstagramTransformPass.php b/src/Pass/InstagramTransformPass.php index 55c25cc4..2b67022f 100644 --- a/src/Pass/InstagramTransformPass.php +++ b/src/Pass/InstagramTransformPass.php @@ -151,9 +151,9 @@ protected function getShortcodeAndUrl(DOMQuery $el) foreach ($links as $link) { $href = $link->attr('href'); $matches = []; - if (preg_match('&(*UTF8)instagram.com/p/([^/]+)/?&i', $href, $matches)) { - if (!empty($matches[1])) { - $shortcode = $matches[1]; + if (preg_match('&(*UTF8)instagram.com/(p|tv)/([^/]+)/?&i', $href, $matches)) { + if (!empty($matches[2])) { + $shortcode = $matches[2]; $url = $href; break; }