randydev commited on
Commit
753c17f
·
verified ·
1 Parent(s): 9058f06

Update lib/all.js

Browse files
Files changed (1) hide show
  1. lib/all.js +22 -3
lib/all.js CHANGED
@@ -17,6 +17,8 @@ import { TeraboxDownloader, TeraboxV2Downloader } from '../lib/@randydev/terabox
17
 
18
  import * as igdlv2 from "instagram-url-direct";
19
  import * as xpro from 'xnxx-scraper';
 
 
20
  import { igdl } from 'ruhend-scraper'
21
 
22
  import {
@@ -41,9 +43,25 @@ async function InstagramDLV2(url) {
41
  }
42
 
43
  async function InstagramDLV3(url) {
44
- const data = await igdl(url);
45
- console.log(data);
46
- return data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
  async function XsearchDownloaderV2(q) {
@@ -82,6 +100,7 @@ export {
82
  PinterestDownloader,
83
  InstagramDLV2,
84
  InstagramDLV3,
 
85
  XsearchDownloaderV2,
86
  XInfoDownloaderV2,
87
  };
 
17
 
18
  import * as igdlv2 from "instagram-url-direct";
19
  import * as xpro from 'xnxx-scraper';
20
+ import * as happykntl from 'happy-dl';
21
+
22
  import { igdl } from 'ruhend-scraper'
23
 
24
  import {
 
43
  }
44
 
45
  async function InstagramDLV3(url) {
46
+ try {
47
+ const data = await igdl(url);
48
+ console.log(data);
49
+ return data;
50
+ } catch(err) {
51
+ console.error(err);
52
+ return null;
53
+ }
54
+ }
55
+
56
+ async function InstagramDLV4(url) {
57
+ try {
58
+ const data = await happykntl.instagramDownloader(url);
59
+ console.log(data);
60
+ return data;
61
+ } catch(err) {
62
+ console.error(err);
63
+ return null;
64
+ }
65
  }
66
 
67
  async function XsearchDownloaderV2(q) {
 
100
  PinterestDownloader,
101
  InstagramDLV2,
102
  InstagramDLV3,
103
+ InstagramDLV4,
104
  XsearchDownloaderV2,
105
  XInfoDownloaderV2,
106
  };