[VkBridge] Photo and timestamp fixes (#1287)
* [VkBridge] Correct parsing of photos, fix timestamp for old posts
This commit is contained in:
parent
af48f36fd2
commit
50b234d893
1 changed files with 3 additions and 1 deletions
|
@ -167,7 +167,7 @@ class VkBridge extends BridgeAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
// get all photos
|
// get all photos
|
||||||
foreach($post->find('div.wall_text > a.page_post_thumb_wrap') as $a) {
|
foreach($post->find('div.wall_text a.page_post_thumb_wrap') as $a) {
|
||||||
$result = $this->getPhoto($a);
|
$result = $this->getPhoto($a);
|
||||||
if ($result == null) continue;
|
if ($result == null) continue;
|
||||||
$a->outertext = '';
|
$a->outertext = '';
|
||||||
|
@ -356,6 +356,8 @@ class VkBridge extends BridgeAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = date_parse($strdate);
|
$date = date_parse($strdate);
|
||||||
|
} elseif ($date['hour'] === false) {
|
||||||
|
$date['hour'] = $date['minute'] = '00';
|
||||||
}
|
}
|
||||||
return strtotime($date['day'] . '-' . $date['month'] . '-' . $date['year'] . ' ' .
|
return strtotime($date['day'] . '-' . $date['month'] . '-' . $date['year'] . ' ' .
|
||||||
$date['hour'] . ':' . $date['minute']);
|
$date['hour'] . ':' . $date['minute']);
|
||||||
|
|
Loading…
Reference in a new issue