diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php
index a150c64..93e1a18 100644
--- a/bridges/InstagramBridge.php
+++ b/bridges/InstagramBridge.php
@@ -41,29 +41,27 @@ class InstagramBridge extends BridgeAbstract{
$innertext = $script->innertext;
break;
}
-
-
-
+
$json = trim(substr($innertext, $pos+18), ' =;');
$data = json_decode($json);
- $userMedia = $data->entry_data->UserProfile[0]->userMedia;
-
+
+
+ $userMedia = $data->entry_data->ProfilePage[0]->user->media->nodes;
foreach($userMedia as $media)
{
- $image = $media->images->standard_resolution;
$item = new \Item();
- $item->uri = $media->link;
- $item->content = '';
+ $item->uri = "https://instagram.com/p/".$media->code."/";
+ $item->content = '';
if (isset($media->caption))
{
- $item->title = $media->caption->text;
+ $item->title = $media->caption;
} else {
- $item->title = basename($image->url);
+ $item->title = basename($media->display_src);
}
- $item->timestamp = $media->created_time;
+ $item->timestamp = $media->date;
$this->items[] = $item;
}