JSPM

  • Created
  • Published
  • Downloads 8738
  • Score
    100M100P100Q137708F
  • License MIT

Get direct url to download from Instagram media links

Package Exports

  • instagram-url-direct
  • instagram-url-direct/src/instagram.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (instagram-url-direct) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Works with:

It currently works with general Instagram posts, which can contain multiple images/videos or a single one.

Stories not supported.

Instalation :

> npm i --save instagram-url-direct

Example

const instagramGetUrl = require("instagram-url-direct")
let data = await instagramGetUrl("https://www.instagram.com/tv/CdmYaq3LAYo/")
console.log(data)

Output Example

Single result

{
    results_number : 1,
    post_info:{
        owner_username: "username",
        owner_fullname: "fullname",
        is_verified: false,
        is_private: false,
        likes: 6,
        is_ad: false
    }
    url_list : [
        'https://scontent.cdninstagram.com....'
    ],
    media_details:[
        {
            type: "video",
            dimensions: {height: "1080", width: "1920"},
            video_view_count: 1000,
            url: "https://scontent.cdninstagram.com...",
            thumbnail: 'https://scontent.cdninstagram.com...'
        }
    ]
}

Multi results

{
    results_number : 3,
    post_info:{
        owner_username: "username",
        owner_fullname: "fullname",
        is_verified: false,
        is_private: false,
        likes: 10,
        is_ad: false
    }
    url_list : [
        'https://scontent.cdninstagram.com...',
        'https://scontent.cdninstagram.com...',
        'https://scontent.cdninstagram.com...',
    ],
    media_details:[
        {
            type: "video",
            dimensions: {height: "640", width: "640"},
            video_view_count: 100,
            url: "https://scontent.cdninstagram.com...",
            thumbnail: 'https://scontent.cdninstagram.com...'
        },
        {
            type: "video",
            dimensions: {height: "640", width: "640"},
            video_view_count: 100,
            url: "https://scontent.cdninstagram.com...",
            thumbnail: 'https://scontent.cdninstagram.com...'
        },
        {
            type: "image",
            dimensions: {height: "640", width: "640"},
            url: "https://scontent.cdninstagram.com...",
        }
    ]
}