priyansh-ig-downloader 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,28 +1,31 @@
1
1
  ## Instalation :
2
2
  ```bash
3
- > npm i --save priyansh-ig-downloader
3
+ > npm i priyansh-ig-downloader
4
4
  ```
5
5
 
6
6
  ## Example
7
7
  ```js
8
- const instagramGetUrl = require("priyansh-ig-downloader")
9
- async function downloadMedia() {
10
- try {
11
- const download = await instagramGetUrl("https://www.instagram.com/tv/CdmYaq3LAYo/");
12
- console.log(download);
13
- } catch (error) {
14
- console.error(error);
15
- }
8
+ const insta = require("priyansh-ig-downloader");
9
+
10
+ async function test(url) {
11
+ try {
12
+ const result = await insta(url);
13
+ console.log(result);
14
+ } catch (error) {
15
+ console.error("Error fetching data:", error);
16
+ }
16
17
  }
17
18
 
18
- downloadMedia();
19
+ test("https://www.instagram.com/reel/C9HytkYS4Hc/?utm_source=ig_web_copy_link");
19
20
  ```
20
21
  ## Output Example
21
22
  ```
22
23
  {
23
- results_number : 1,
24
- url_list : [
25
- 'https://scontent.cdninstagram.com/v/t50.2886-16/281176759_330829732466343_6214175692160325206_n.mp4?_nc_ht=scontent.cdninstagram.com&_nc_cat=103&_nc_ohc=tsiSkUxDxfEAX-u8MmX&edm=AJBgZrYBAAAA&ccb=7-5&oe=62D43703&oh=00_AT-8ndeJFByZE0H6IqNwZasKMBfaqXRiwGoFL1tR_RSflA&_nc_sid=78c662'
26
- ]
24
+ "video": [
25
+ {
26
+ "video": "https://scontent.cdninstagram.com/o1/v/t16/f2/m69/An9VukWeVHPYEj_QoBTxvf0tfXakKJyWBnztDeTFbQnOgu4XVsGh1Y4xi8ucjLzRFEqnQXom7sn5MSlr01mZbWN3.mp4?efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uY2xpcHMuYzIuMTA4MC5iYXNlbGluZSJ9&_nc_ht=scontent.cdninstagram.com&_nc_cat=111&vs=497431829473320_3124900975&_nc_vs=HBksFQIYOnBhc3N0aHJvdWdoX2V2ZXJzdG9yZS9HQXZCQlJRTXI0ZThmc0FDQUhwU212emZpdTU5YnBSMUFBQUYVAALIAQAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dBVFAwQnBUU1J0S21NZ0NBSHFCM0hWajJtNEVicV9FQUFBRhUCAsgBACgAGAAbABUAACb%2B7dzD24aXQRUCKAJDMywXQDuQ5WBBiTcYFmRhc2hfYmFzZWxpbmVfMTA4MHBfdjERAHX%2BBwA%3D&_nc_rid=5c862724ed&ccb=9-4&oh=00_AYCg7DV04LknbzJ_Y09ehpcdqt3Jl9gykX2lFieJAjWUJg&oe=668D6CE5&_nc_sid=10d13b",
27
+ "thumbnail": "https://scontent.cdninstagram.com/v/t51.29350-15/450258777_1528082971118106_3162685055130347958_n.jpg?stp=dst-jpg_e15&_nc_ht=scontent.cdninstagram.com&_nc_cat=1&_nc_ohc=P2DVaf_sZ0IQ7kNvgFSmczi&edm=APs17CUBAAAA&ccb=7-5&oh=00_AYC7b5Dib4CyVhX_h6D1Tb8hZSuKD0fbAfcNcvN78enfaA&oe=66916EA3&_nc_sid=10d13b"
28
+ }
29
+ ]
27
30
  }
28
31
  ```
package/package.json CHANGED
@@ -1,36 +1,67 @@
1
+
1
2
  {
2
3
  "name": "priyansh-ig-downloader",
3
- "version": "2.0.0",
4
- "description": "Get direct url to download from Instagram media links",
5
- "main": "src/index.js",
4
+ "version": "2.0.1",
5
+ "main": "dist/bundle.js",
6
6
  "scripts": {
7
- "test": "node src/test.js"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/priyanshu192/priyansh-ig-downloader.git"
7
+ "build": "rollup --config",
8
+ "test": "node ./test/test.js"
12
9
  },
13
10
  "keywords": [
14
- "instagram",
15
- "downloader",
16
- "media",
11
+ "Instagram",
12
+ "Downloader",
13
+ "Download",
14
+ "Media",
17
15
  "link",
18
- "photo",
19
- "video",
20
- "url",
21
- "picture",
16
+ "Photo",
17
+ "Video",
18
+ "Videos",
19
+ "Url",
20
+ "Picture",
22
21
  "image",
23
- "download"
22
+ "Images",
23
+ "download",
24
+ "insta",
25
+ "Stories",
26
+ "Node.js",
27
+ "Instagram API",
28
+ "Social Media",
29
+ "Media Downloader",
30
+ "Instagram Downloader",
31
+ "JavaScript",
32
+ "API Integration",
33
+ "IG Media Download",
34
+ "Social Media Tools"
24
35
  ],
25
36
  "author": "Priyansh Rajput",
26
37
  "license": "MIT",
38
+ "description": "This Node.js package provides a simple and efficient way to download media from Instagram. Whether you need to download images, videos, or stories, this package makes it easy with minimal setup. Designed for developers, this package supports various media formats and ensures quick downloads, making it perfect for both personal use and larger projects. With straightforward API calls, you can integrate Instagram media downloading functionality into your applications effortlessly.",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/priyanshu192/priyansh-ig-downloader.git"
42
+ },
27
43
  "bugs": {
28
44
  "url": "https://github.com/priyanshu192/priyansh-ig-downloader/issues"
29
45
  },
30
46
  "homepage": "https://github.com/priyanshu192/priyansh-ig-downloader#readme",
31
47
  "dependencies": {
32
- "axios": "^1.6.8",
33
- "cheerio": "^1.0.0-rc.12",
34
- "qs": "^6.12.1"
48
+ "crypto-js": "^4.2.0"
49
+ },
50
+ "devDependencies": {
51
+ "rollup": "^4.18.0"
52
+ },
53
+ "files": [
54
+ "README.md",
55
+ "LICENSE"
56
+ ],
57
+ "engines": {
58
+ "node": ">=14.0.0"
59
+ },
60
+ "private": false,
61
+ "directories": {
62
+ "test": "test"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public"
35
66
  }
36
67
  }
@@ -1,20 +0,0 @@
1
- name: "publish npm"
2
-
3
- on: push
4
-
5
- jobs:
6
- publish:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - name: checkout
10
- uses: actions/checkout@v2
11
- - name: node
12
- uses: actions/setup-node@v2
13
- with:
14
- node-version: 14
15
- registry-url: https://registry.npmjs.org
16
- - name: publish
17
- run: npm publish --access public
18
- # working-directory: package.json
19
- env:
20
- NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
package/src/index.js DELETED
@@ -1 +0,0 @@
1
- const _0x37d7d4=_0x1531;(function(_0x371809,_0x364da3){const _0x2dce0a=_0x1531,_0x3e4b98=_0x371809();while(!![]){try{const _0x30bc69=parseInt(_0x2dce0a(0x14e))/0x1*(parseInt(_0x2dce0a(0x157))/0x2)+-parseInt(_0x2dce0a(0x146))/0x3*(-parseInt(_0x2dce0a(0x14d))/0x4)+-parseInt(_0x2dce0a(0x145))/0x5+-parseInt(_0x2dce0a(0x141))/0x6+-parseInt(_0x2dce0a(0x142))/0x7*(parseInt(_0x2dce0a(0x153))/0x8)+-parseInt(_0x2dce0a(0x149))/0x9*(parseInt(_0x2dce0a(0x140))/0xa)+-parseInt(_0x2dce0a(0x13b))/0xb*(-parseInt(_0x2dce0a(0x147))/0xc);if(_0x30bc69===_0x364da3)break;else _0x3e4b98['push'](_0x3e4b98['shift']());}catch(_0x2db4c9){_0x3e4b98['push'](_0x3e4b98['shift']());}}}(_0x4179,0x69903));function _0x4179(){const _0x1e0d14=['268287AkNdcD','58092ojtrpm','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/115.0.0.0\x20Safari/537.36\x20Edg/115.0.1901.183','9TZtBoB','empty','application/x-www-form-urlencoded','stringify','32OWjRCx','1704jZmKJh','length','attr','en-US,en;q=0.9','data','64WxqZFr','post','.download-items','cheerio','530TjpNSR','gzip,\x20deflate,\x20br','https://v3.saveig.app/api/ajaxSearch','same-origin','media','https://saveig.app/','https://saveig.app','XMLHttpRequest','href','2189WLtLqH','each','*/*','axios','\x22Windows\x22','6289310GtQnRC','144996vRYaOf','337106ZyCWkS','.download-items__btn\x20>\x20a','exports','3298015MRDSlS'];_0x4179=function(){return _0x1e0d14;};return _0x4179();}function _0x1531(_0x19a0ad,_0x148dd2){const _0x41799e=_0x4179();return _0x1531=function(_0x1531f3,_0x53c4b2){_0x1531f3=_0x1531f3-0x138;let _0x33c44b=_0x41799e[_0x1531f3];return _0x33c44b;},_0x1531(_0x19a0ad,_0x148dd2);}const axios=require(_0x37d7d4(0x13e))['default'],qs=require('qs'),cheerio=require(_0x37d7d4(0x156));module[_0x37d7d4(0x144)]=instagramGetUrl=_0x3be40d=>{return new Promise(async(_0x4f5614,_0x2b8ede)=>{const _0xbba4e0=_0x1531;try{const _0x294561=_0xbba4e0(0x159),_0x1d4613={'q':_0x3be40d,'t':_0xbba4e0(0x15b),'lang':'en'},_0x4df1b1={'Accept':_0xbba4e0(0x13d),'Origin':_0xbba4e0(0x138),'Referer':_0xbba4e0(0x15c),'Accept-Encoding':_0xbba4e0(0x158),'Accept-Language':_0xbba4e0(0x151),'Content-Type':_0xbba4e0(0x14b),'Sec-Ch-Ua':'\x22Not/A)Brand\x22;v=\x2299\x22,\x20\x22Microsoft\x20Edge\x22;v=\x22115\x22,\x20\x22Chromium\x22;v=\x22115\x22','Sec-Ch-Ua-Mobile':'?0','Sec-Ch-Ua-Platform':_0xbba4e0(0x13f),'Sec-Fetch-Dest':_0xbba4e0(0x14a),'Sec-Fetch-Mode':'cors','Sec-Fetch-Site':_0xbba4e0(0x15a),'User-Agent':_0xbba4e0(0x148),'X-Requested-With':_0xbba4e0(0x139)},_0x5ab99e=await axios[_0xbba4e0(0x154)](_0x294561,qs[_0xbba4e0(0x14c)](_0x1d4613),{'headers':_0x4df1b1}),_0x480e5f=_0x5ab99e[_0xbba4e0(0x152)][_0xbba4e0(0x152)];if(!_0x480e5f)_0x2b8ede({'results_number':0x0,'url_list':[]});const _0x2300dd=cheerio['load'](_0x480e5f),_0x435ce6=_0x2300dd(_0xbba4e0(0x155)),_0x51b0de=[];_0x435ce6[_0xbba4e0(0x13c)]((_0x23b801,_0x4e374b)=>{const _0x77a53f=_0xbba4e0,_0x5d4d11=_0x2300dd(_0x4e374b)['find'](_0x77a53f(0x143))[_0x77a53f(0x150)](_0x77a53f(0x13a));_0x51b0de['push'](_0x5d4d11);});let _0x321305={'results_number':_0x51b0de[_0xbba4e0(0x14f)],'url_list':_0x51b0de};_0x4f5614(_0x321305);}catch(_0x1d366e){_0x2b8ede(_0x1d366e);}});};
package/src/test.js DELETED
@@ -1,28 +0,0 @@
1
- const instagramGetUrl = require("./index")
2
-
3
- async function test(url){
4
- let result = await instagramGetUrl(url)
5
- return result
6
- }
7
-
8
- test("https://www.instagram.com/p/CMAMhvgsVal1/").then(result=>{
9
- console.log("Test Videos/Images OK")
10
- console.dir(result, {depth: null})
11
- }).catch(err=>{
12
- console.error(err)
13
- })
14
-
15
- /*
16
- test("https://www.instagram.com/p/CHSvvKXpkH6/").then(result=>{
17
- console.log("Test Only Image OK")
18
- console.log(result)
19
- }).catch(err=>{
20
- console.error(err)
21
- })
22
-
23
- test("https://www.instagram.com/tv/CdmYaq3LAYo/").then(result=>{
24
- console.log("Test Only Video OK")
25
- console.log(result)
26
- }).catch(err=>{
27
- console.error(err)
28
- })*/