priyansh-ig-downloader 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Example
7
7
  ```js
8
- const instagramGetUrl = require("priyansh-ig-downloader")
8
+ const instagramGetUrl = require("instagram-url-direct")
9
9
  async function downloadMedia() {
10
10
  try {
11
11
  const download = await instagramGetUrl("https://www.instagram.com/tv/CdmYaq3LAYo/");
package/package.json CHANGED
@@ -1,67 +1,36 @@
1
-
2
1
  {
3
2
  "name": "priyansh-ig-downloader",
4
- "version": "0.0.1",
5
- "main": "dist/bundle.js",
3
+ "version": "1.0.0",
4
+ "description": "Get direct url to download from Instagram media links",
5
+ "main": "src/index.js",
6
6
  "scripts": {
7
- "build": "rollup --config",
8
- "test": "node ./test/test.js"
7
+ "test": "node src/test.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/priyanshu192/priyansh-ig-downloader.git"
9
12
  },
10
13
  "keywords": [
11
- "Instagram",
12
- "Downloader",
13
- "Download",
14
- "Media",
14
+ "instagram",
15
+ "downloader",
16
+ "media",
15
17
  "link",
16
- "Photo",
17
- "Video",
18
- "Videos",
19
- "Url",
20
- "Picture",
18
+ "photo",
19
+ "video",
20
+ "url",
21
+ "picture",
21
22
  "image",
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"
23
+ "download"
35
24
  ],
36
- "author": "Priyansh Rajput",
25
+ "author": "victorsouzaleal <victorsouzaleal@gmail.com>",
37
26
  "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
- },
43
27
  "bugs": {
44
28
  "url": "https://github.com/priyanshu192/priyansh-ig-downloader/issues"
45
29
  },
46
30
  "homepage": "https://github.com/priyanshu192/priyansh-ig-downloader#readme",
47
31
  "dependencies": {
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"
32
+ "axios": "^1.6.8",
33
+ "cheerio": "^1.0.0-rc.12",
34
+ "qs": "^6.12.1"
66
35
  }
67
36
  }
package/src/index.js ADDED
@@ -0,0 +1 @@
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 ADDED
@@ -0,0 +1,28 @@
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
+ })*/