mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[VkBridge] Follow site changes (#3244)
This commit is contained in:
parent
7f1b32f390
commit
91f91ba621
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue