Skip to content

igsha/instafs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the project

A fuse-based filesystem to get access to instagram pages.

How to install

This application is a python package. You can use pip to install it directly from github:

$ pip install https://github.com/igsha/instafs/tarball/master

Another option is to use nix:

$ nix-env -f https://github.com/igsha/instafs/tarball/master -i -E 'f: (import <nixpkgs> {}).callPackage f {}'

How to use

Mount

Like any fuse-based filesystem instafs should be started as

$ instafs -u <user> /mount/point
Parameters
<user>

Account name to mount.

/mount/point

A folder where the program should mount account data.

Working with mount point

Now the chosen account is mounted as ordinary folder in the mount point. You can list its content and watch images/video.

Each post is a folder with

  • media data: jpeg images or mp4 video files;

  • caption.txt file with the given caption;

  • comments.txt contains comments in reversed order (may be omitted);

  • next folder contains the next batch of comments (if presented);

  • info.json that contains service information;

  • the folder name is a sequence number within the account;

  • the files timestamps are the real creation time of the post.

The root folder of an account contains

  • initial posts (12 items);

  • special next folder that contains the next 12 posts;

  • biography.txt file with the description of the account;

  • user.json is a service information of the mounted account.

Example for the instagram account:

$ mkdir /tmp/mnt
$ instafs -u instagram /tmp/mnt
$ cd /tmp/mnt
/tmp/mnt $ ls
6367  6368  6369  6370  6371  6372  6373  6374  6375  6376  6377  6378  biography.txt  next  userinfo.json
/tmp/mnt $ cat biography.txt
#ShareBlackStories
/tmp/mnt $ cd next
/tmp/mnt/next $ ls
6355  6356  6357  6358  6359  6360  6361  6362  6363  6364  6365  6366  next
/tmp/mnt/next $ cd next
/tmp/mnt/next/next $ ls
6343  6344  6345  6346  6347  6348  6349  6350  6351  6352  6353  6354  next
/tmp/mnt/next/next $ cd 6345
/tmp/mnt/next/next/6345 $ ll
total 116K
-r--r--r-- 1 igor users 115K May 13 19:20 0.jpg
-r--r--r-- 1 igor users  311 May 13 19:20 caption.txt
-r--r--r-- 1 igor users 3.4K May 13 19:20 comments.txt
-r--r--r-- 1 igor users  117 May 13 19:20 info.json
drwxr-xr-x 2 igor users 4.0K May 13 19:20 next
/tmp/mnt/next/next/6345 $ cat caption.txt
To: Graduating seniors ⁣
From: @daquan⁣

Subject:  A meme just for you ❤️⁣

Email:⁣
Graduation or no graduation, you did it 🙏🏾⁣
You hustled hard and got it done 💪🏾⁣
Be proud of yourself for all the hours of hard work you put in to get that diploma 🔥 ⁣

#Graduation2020
/tmp/mnt/next/next/6345 $ cat info.json
{
  "id": "2308266482250920588",
  "shortcode": "CAInCLJgbKM",
  "url": "https://www.instagram.com/p/CAInCLJgbKM"
}
/tmp/mnt/next/next/6345 $ cd
$ fusermount -u /tmp/mnt
$ rmdir /tmp/mnt

Unmount

To unmount account just use

$ fusermount -u /mount/point