stefansundin/rssbox

Private Instagram Feeds?

mrbenns opened this issue · 3 comments

Is this even possible in the current framework? I would assume you would have to store login details somewhere?

Sorry for not responding for so long. It is possible to do this, but it is very hard to do, and I don't know if it will remain supported forever. It has broken a couple of times, and when it does, you might have to re-subscribe. I haven't tried this recently, so let me know if it still works at all.

The instructions are written in the code:

rssbox/app.rb

Lines 544 to 553 in 3f45de2

# To subscribe to private feeds, follow these steps in bash:
# u=your_username
# p=your_password
# your_friends_username=your_friends_username
# your_friends_userid=$(curl -s "https://www.instagram.com/$your_friends_username/" | grep -oE '"id":"([0-9]+)"' | head -1 | cut -d'"' -f4)
# ua="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0"
# csrftoken=$(curl -sI https://www.instagram.com/ -A "$ua" | grep -i 'set-cookie: csrftoken=' | cut -d';' -f1 | cut -d= -f2)
# sessionid=$(curl -sv https://www.instagram.com/accounts/login/ajax/ -A "$ua" -H 'referer: https://www.instagram.com/accounts/login/' -b "csrftoken=$csrftoken" -H "x-csrftoken: $csrftoken" --data "username=$u&password=$p" 2>&1 | grep -i 'set-cookie: sessionid=' | cut -d';' -f1 | cut -d= -f2)
# echo "https://rssbox.herokuapp.com/instagram/$your_friends_userid/$your_friends_username?csrftoken=$csrftoken&sessionid=$sessionid"
# Please host the app yourself if you decide to do this, otherwise you will leak the tokens to me and the privacy of your friends posts.

The comment above no longer works. Right now you can self-host and set the INSTAGRAM_SESSIONID variable. This may change later (see #39).