From 68ee24d6bd7572fde7984b34176eecbeecf810cc Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Thu, 8 Nov 2018 18:36:07 +0100 Subject: [PATCH] [FacebookBridge] Remove videos and views This commit adds filters to remove embedded videos and view counts from all posts. This doesn't remove the preview image for videos, which are embedded separately. --- bridges/FacebookBridge.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index 400e9734..e9114e6b 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -577,6 +577,16 @@ EOD; $content = $post->find('.userContentWrapper', 0); + // Remove embedded videos (the preview image remains) + foreach($content->find('._5mly') as $video) { + $video->outertext = ''; + } + + // Remove "Views ..." + foreach($content->find('._2ezg') as $subject) { + $subject->outertext = ''; + } + // Remove origin information (i.e. "YOUTUBE.COM") from embedded media foreach($content->find('._59tj') as $subject) { $subject->outertext = '';