Skip to content

Commit

Permalink
[VkBridge] Fix single photo duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
em92 committed Dec 3, 2023
1 parent 206edae commit 0cfeaaf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bridges/VkBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,13 @@ public function collectData()
$copy_quote->outertext = "<br>Reposted ($copy_quote_author): <br>$copy_quote_content";
}

foreach ($post->find('.PrimaryAttachment .PhotoPrimaryAttachment') as $pa) {
$img = $pa->find('.PhotoPrimaryAttachment__imageElement', 0);
if (is_object($img)) {
$pa->outertext = $img->outertext;
}
}

foreach ($post->find('.SecondaryAttachment') as $sa) {
$sa_href = $sa->getAttribute('href');
if (!$sa_href) {
Expand Down

0 comments on commit 0cfeaaf

Please sign in to comment.