From 91f91ba621f30c89641a912e2f6a63113048b8ae Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Tue, 7 Feb 2023 19:10:43 +0500 Subject: [PATCH] [VkBridge] Follow site changes (#3244) --- bridges/VkBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/VkBridge.php b/bridges/VkBridge.php index 5d3ca52b..de28f807 100644 --- a/bridges/VkBridge.php +++ b/bridges/VkBridge.php @@ -316,7 +316,7 @@ class VkBridge extends BridgeAbstract $item['categories'] = $hashtags; // get post link - $post_link = $post->find('a.post_link', 0)->getAttribute('href'); + $post_link = $post->find('a.PostHeaderSubtitle__link', 0)->getAttribute('href'); preg_match('/wall-?\d+_(\d+)/', $post_link, $preg_match_result); $item['post_id'] = intval($preg_match_result[1]); $item['uri'] = $post_link; @@ -393,10 +393,10 @@ class VkBridge extends BridgeAbstract private function getTime($post) { - if ($time = $post->find('span.rel_date', 0)->getAttribute('time')) { + if ($time = $post->find('time.PostHeaderSubtitle__item', 0)->getAttribute('time')) { return $time; } else { - $strdate = $post->find('span.rel_date', 0)->plaintext; + $strdate = $post->find('time.PostHeaderSubtitle__item', 0)->plaintext; $strdate = preg_replace('/[\x00-\x1F\x7F-\xFF]/', ' ', $strdate); $date = date_parse($strdate);