From 386f0ca379eb5bb43ae33b0d37f2baf4c81c1518 Mon Sep 17 00:00:00 2001 From: Damien Calesse Date: Wed, 2 Mar 2016 13:14:22 +0100 Subject: [PATCH] Fix BandCamp image display --- bridges/BandcampBridge.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bridges/BandcampBridge.php b/bridges/BandcampBridge.php index 8d1d2aa..ce002e5 100644 --- a/bridges/BandcampBridge.php +++ b/bridges/BandcampBridge.php @@ -33,10 +33,14 @@ class BandcampBridge extends BridgeAbstract{ } foreach($html->find('li.item') as $release) { + $script = $release->find('div.art', 0)->getAttribute('onclick'); + $uri = ltrim($script, "return 'url("); + $uri = rtrim($uri, "')"); + $item = new \Item(); $item->name = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->title = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; - $item->content = '
' . $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; + $item->content = '
' . $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->id = $release->find('a',0)->getAttribute('href'); $item->uri = $release->find('a',0)->getAttribute('href'); $this->items[] = $item;