randydev commited on
Commit
7edd258
·
verified ·
1 Parent(s): d7ade7a

Update lib/facebook.js

Browse files
Files changed (1) hide show
  1. lib/facebook.js +4 -2
lib/facebook.js CHANGED
@@ -3,7 +3,7 @@ import * as cheerio from "cheerio";
3
  import { FacebookDlArgsSchema, FacebookDlSchema } from "../lib/types/facebook-v1.js";
4
  import { DEFAULT_HEADERS } from "./constant.js";
5
 
6
- export default async function facebookdl(url) {
7
  FacebookDlArgsSchema.parse(arguments);
8
 
9
  const html = await got("https://fdownloader.net/en", { headers: { ...DEFAULT_HEADERS } }).text();
@@ -58,8 +58,10 @@ export default async function facebookdl(url) {
58
  return FacebookDlSchema.parse(result);
59
  }
60
 
61
- export async function convert(url, v_id, ftype, videoUrl, videoType, videoCodec, audioUrl, audioType, fquality, fname, exp, token) {
62
  return got.post(url, {
63
  form: { ftype, v_id, videoUrl, videoType, videoCodec, audioUrl, audioType, fquality, fname, exp, token, cv: "v2" },
64
  });
65
  }
 
 
 
3
  import { FacebookDlArgsSchema, FacebookDlSchema } from "../lib/types/facebook-v1.js";
4
  import { DEFAULT_HEADERS } from "./constant.js";
5
 
6
+ async function facebookdl(url) {
7
  FacebookDlArgsSchema.parse(arguments);
8
 
9
  const html = await got("https://fdownloader.net/en", { headers: { ...DEFAULT_HEADERS } }).text();
 
58
  return FacebookDlSchema.parse(result);
59
  }
60
 
61
+ async function convert(url, v_id, ftype, videoUrl, videoType, videoCodec, audioUrl, audioType, fquality, fname, exp, token) {
62
  return got.post(url, {
63
  form: { ftype, v_id, videoUrl, videoType, videoCodec, audioUrl, audioType, fquality, fname, exp, token, cv: "v2" },
64
  });
65
  }
66
+
67
+ export { facebookdl, convert };