aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/InstagramBridge.php8
-rw-r--r--docs/10_Bridge_Specific/Instagram.md7
2 files changed, 10 insertions, 5 deletions
diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php
index 4e3bd23d..faed49fc 100644
--- a/bridges/InstagramBridge.php
+++ b/bridges/InstagramBridge.php
@@ -14,6 +14,9 @@ class InstagramBridge extends BridgeAbstract
'cache_timeout' => [
'required' => false,
],
+ 'ds_user_id' => [
+ 'required' => false,
+ ],
];
const PARAMETERS = [
@@ -82,8 +85,9 @@ class InstagramBridge extends BridgeAbstract
{
$headers = [];
$sessionId = $this->getOption('session_id');
- if ($sessionId) {
- $headers[] = 'cookie: sessionid=' . $sessionId;
+ $dsUserId = $this->getOption('ds_user_id');
+ if ($sessionId and $dsUserId) {
+ $headers[] = 'cookie: sessionid=' . $sessionId . '; ds_user_id=' . $dsUserId;
}
return getContents($uri, $headers);
}
diff --git a/docs/10_Bridge_Specific/Instagram.md b/docs/10_Bridge_Specific/Instagram.md
index 6090ee4a..7b9bf6b2 100644
--- a/docs/10_Bridge_Specific/Instagram.md
+++ b/docs/10_Bridge_Specific/Instagram.md
@@ -7,8 +7,8 @@ it is suggested to deploy a private RSS-Bridge instance that uses a working Inst
Configuration
-------------
-1. Retreiving session id.
-The following steps describe how to get the session id using a Chromium-based browser.
+1. Retreiving `session id` and `ds_user_id`.
+The following steps describe how to get the `session id` and `ds user id` using a Chromium-based browser.
- Create an Instagram account, that you will use for your RSS-Bridge instance.
It is NOT recommended to use your existing account that is used for common interaction with Instagram services.
@@ -29,7 +29,7 @@ It is NOT recommended to use your existing account that is used for common inter
- In the new frame open the "Headers" tab and scroll to "Request Headers"
-- There will be a cookie param will lots of `<key>=<value>;` text. You need the value of the "sessionid" key. Copy it.
+- There will be a cookie param will lots of `<key>=<value>;` text. You need the value of the "sessionid" and "ds_user_id" keys. Copy them.
2. Configuring RSS-Bridge
@@ -38,6 +38,7 @@ It is NOT recommended to use your existing account that is used for common inter
```
[InstagramBridge]
session_id = %sessionid from step 1%
+ds_user_id = %ds_user_id from step 1%
cache_timeout = %cache timeout in seconds%
```