yt-dlp 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yt-dlp might be problematic. Click here for more details.

Files changed (37) hide show
  1. package/README.md +448 -0
  2. package/app/config/index.js +1 -0
  3. package/app/examples/audio/dl_Auto_Sorted_Data.js +80 -0
  4. package/app/examples/audio/dl_Custom_Quality_Data.js +83 -0
  5. package/app/models/audio/read_1.md +117 -0
  6. package/app/models/audio/read_2.md +119 -0
  7. package/app/models/audio/read_3.md +38 -47
  8. package/app/models/audio/read_4.md +35 -43
  9. package/app/models/video/read_3.md +111 -0
  10. package/app/models/video/read_4.md +106 -0
  11. package/app/routes/audio/index.js +247 -1
  12. package/app/routes/video/index.js +819 -1
  13. package/app/utils/index.js +44 -1
  14. package/package.json +8 -7
  15. package/test/{index.js → audio.js} +25 -27
  16. package/test/video.js +106 -0
  17. package/temp/.dockerignore +0 -142
  18. package/temp/Dockerfile +0 -17
  19. package/temp/LICENSE +0 -21
  20. package/temp/docs/index.html +0 -108
  21. package/temp/examples/audioData_autoSorted.js +0 -88
  22. package/temp/examples/audioData_customQuality.js +0 -88
  23. package/temp/examples/dloadAudio_autoSorted.js +0 -89
  24. package/temp/examples/dloadAudio_customQuality.js +0 -89
  25. package/temp/examples/dloadVideo_autoSorted.js +0 -71
  26. package/temp/examples/dloadVideo_customQuality.js +0 -73
  27. package/temp/examples/videoData_autoSorted.js +0 -80
  28. package/temp/examples/videoData_customQuality.js +0 -78
  29. package/temp/index.js +0 -50
  30. package/temp/package.json +0 -65
  31. package/temp/routes/audio/ffmpeg.js +0 -348
  32. package/temp/routes/audio/index.js +0 -390
  33. package/temp/routes/video/ffmpeg.js +0 -857
  34. package/temp/routes/video/index.js +0 -502
  35. package/temp/routes/web/index.js +0 -110
  36. package/temp/src/LiquidYouTube.gif +0 -0
  37. package/temp/src/requirements.txt +0 -10
package/README.md CHANGED
@@ -541,6 +541,454 @@ Url: https://rr6---sn-gwpa-jj06.googlevideo.com/videoplayback?
541
541
 
542
542
  <!-- "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎" -->
543
543
 
544
+ <br>
545
+ <h1 align="center">
546
+ <b>📢 audio.dl_Auto_Sorted_Data()
547
+ </b>
548
+ </h1>
549
+
550
+ - every youtube video metadata returned from server will have 'high', "medium', 'low' audio quality.<br />
551
+ - you can get metadata of your selected audio quality depending on your passed parameter.
552
+
553
+ <br />
554
+ <details open>
555
+ <summary><b>🗝️ @parameters/@arguments</b></summary>
556
+ <p>
557
+
558
+ ```js
559
+ /**
560
+ * @param {yturl} yturl -> "youtube-video-link"
561
+ * @param {string} sort -> "highest-possible" || "lowest-possible"
562
+ * @param {folder} @arg {optional} -> auto created if not exists or specified
563
+ */
564
+ ```
565
+
566
+ </p>
567
+ </details>
568
+
569
+ <details >
570
+ <summary><b>⚡Method [promise]</b></summary>
571
+ <p>
572
+
573
+ ```js
574
+ import c from "chalk";
575
+ import { ytdlp } from "ytdlp";
576
+ import Fetch from "node-fetch";
577
+
578
+ ytdlp.audio
579
+ .dl_Auto_Sorted_Data({
580
+ title: api_data.youtube_search[0].TITLE, // optional
581
+ yturl: api_data.youtube_search[0].LINK, // required
582
+ sort: "highest-possible", // required
583
+ folder: "mågneum", // optional
584
+ })
585
+ .then((r) => {
586
+ console.log(
587
+ c.bgGreen("[PROMISE]:"),
588
+ c.bgGrey("audio.dl_Auto_Sorted_Data()")
589
+ );
590
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
591
+ console.log(c.cyan("Message:"), c.gray(r.message));
592
+ })
593
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
594
+ ```
595
+
596
+ </p>
597
+ </details>
598
+
599
+ <details >
600
+ <summary><b>⚡Method [async/await]</b></summary>
601
+ <p>
602
+
603
+ ```js
604
+ import c from "chalk";
605
+ import { ytdlp } from "ytdlp";
606
+ import Fetch from "node-fetch";
607
+
608
+ (async () => {
609
+ const r = await ytdlp.audio
610
+ .Auto_Sorted_Data({
611
+ title: api_data.youtube_search[0].TITLE, // optional
612
+ yturl: api_data.youtube_search[0].LINK, // required
613
+ sort: "highest-possible", // required
614
+ folder: "mågneum", // optional
615
+ })
616
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
617
+ console.log(c.bgGreen("[ASYNC]:"), c.bgGrey("audio.dl_Auto_Sorted_Data()"));
618
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
619
+ console.log(c.cyan("Message:"), c.gray(r.message));
620
+ })();
621
+ ```
622
+
623
+ </p>
624
+ </details>
625
+
626
+ <details >
627
+ <summary><b>🎊Output Layout Example</b></summary>
628
+ <p>
629
+
630
+ ```
631
+ ✓ FETCHING....
632
+ 2.4 secs
633
+ [PROMISE]: audio.dl_Auto_Sorted_Data()
634
+ Downloadpath: ./mågneum/
635
+ Message: INFO: stream starting.
636
+ 100.01%
637
+ INFO: stream sent to client successfully.
638
+ Done in 15.72s.
639
+
640
+ ✓ FETCHING....
641
+ 2.4 secs
642
+ [ASYNC]: audio.dl_Auto_Sorted_Data()
643
+ Downloadpath: ./mågneum/
644
+ Message: INFO: stream starting.
645
+ 100.01%
646
+ INFO: stream sent to client successfully.
647
+ Done in 15.72s.
648
+ ```
649
+
650
+ </p>
651
+ </details>
652
+
653
+ <!-- "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎" -->
654
+
655
+ <br>
656
+ <h1 align="center">
657
+ <b>📢 audio.dl_Custom_Quality_Data()
658
+ </b>
659
+ </h1>
660
+
661
+ - every youtube video metadata returned from server will have 'high', "medium', 'low' audio quality.<br />
662
+ - you can get metadata of your selected audio quality depending on your passed parameter.
663
+
664
+ <br />
665
+ <details open>
666
+ <summary><b>🗝️ @parameters/@arguments</b></summary>
667
+ <p>
668
+
669
+ ```js
670
+ /**
671
+ * @param {yturl} yturl -> "youtube-video-link"
672
+ * @param {string} sort -> "high" || "medium" || "low"
673
+ * @param {folder} @arg {optional} -> auto created if not exists or specified
674
+ */
675
+ ```
676
+
677
+ </p>
678
+ </details>
679
+
680
+ <details >
681
+ <summary><b>⚡Method [promise]</b></summary>
682
+ <p>
683
+
684
+ ```js
685
+ import c from "chalk";
686
+ import { ytdlp } from "ytdlp";
687
+ import Fetch from "node-fetch";
688
+
689
+ ytdlp.audio
690
+ .dl_Custom_Quality_Data({
691
+ title: api_data.youtube_search[0].TITLE, // optional
692
+ yturl: api_data.youtube_search[0].LINK, // required
693
+ folder: "mågneum", // optional
694
+ sort: "high", // required
695
+ })
696
+ .then((r) => {
697
+ console.log(
698
+ c.bgGreen("[PROMISE]:"),
699
+ c.bgGrey("audio.dl_Custom_Quality_Data()")
700
+ );
701
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
702
+ console.log(c.cyan("Message:"), c.gray(r.message));
703
+ })
704
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
705
+ ```
706
+
707
+ </p>
708
+ </details>
709
+
710
+ <details >
711
+ <summary><b>⚡Method [async/await]</b></summary>
712
+ <p>
713
+
714
+ ```js
715
+ import c from "chalk";
716
+ import { ytdlp } from "ytdlp";
717
+ import Fetch from "node-fetch";
718
+
719
+ (async () => {
720
+ const r = await ytdlp.audio
721
+ .dl_Custom_Quality_Data({
722
+ title: api_data.youtube_search[0].TITLE, // optional
723
+ yturl: api_data.youtube_search[0].LINK, // required
724
+ folder: "mågneum", // optional
725
+ sort: "high", // required
726
+ })
727
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
728
+ console.log(
729
+ c.bgGreen("[ASYNC]:"),
730
+ c.bgGrey("ausio.dl_Custom_Quality_Data()")
731
+ );
732
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
733
+ console.log(c.cyan("Message:"), c.gray(r.message));
734
+ })();
735
+ ```
736
+
737
+ </p>
738
+ </details>
739
+
740
+ <details >
741
+ <summary><b>🎊Output Layout Example</b></summary>
742
+ <p>
743
+
744
+ ```
745
+ ✓ FETCHING....
746
+ 2.4 secs
747
+ [PROMISE]: audio.dl_Custom_Quality_Data()
748
+ Downloadpath: ./mågneum/
749
+ Message: INFO: stream starting.
750
+ 100.01%
751
+ INFO: stream sent to client successfully.
752
+ Done in 15.72s.
753
+
754
+ ✓ FETCHING....
755
+ 2.4 secs
756
+ [ASYNC]: audio.dl_Custom_Quality_Data()
757
+ Downloadpath: ./mågneum/
758
+ Message: INFO: stream starting.
759
+ 100.01%
760
+ INFO: stream sent to client successfully.
761
+ Done in 15.72s.
762
+ ```
763
+
764
+ </p>
765
+ </details>
766
+
767
+ <!-- "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎" -->
768
+
769
+ <br>
770
+ <h1 align="center">
771
+ <b>📹 video.dl_Custom_Quality_Data()
772
+ </b>
773
+ </h1>
774
+
775
+ - ⚠️ RETURNS AUDIO-LESS VIDEO METADATA ⚠️
776
+ - every youtube video metadata returned from server will have "2160p", "1440p", "1080p", "720p", "480p", "360p", "240p", "144p".
777
+ - you can get customized metadata depending on your selected resolution and what the max resolution initial video was uploaded at.
778
+
779
+ <br />
780
+ <details open>
781
+ <summary><b>🗝️ @parameters/@arguments</b></summary>
782
+ <p>
783
+
784
+ ```js
785
+ /**
786
+ * @param {yturl} yturl -> "youtube-video-link"
787
+ * @param {string} resolution -> "2160p" || "1440p" || "1080p" || "720p" || "480p" || "360p" || "240p" || "144p"
788
+ */
789
+ ```
790
+
791
+ </p>
792
+ </details>
793
+
794
+ <details >
795
+ <summary><b>⚡Method [promise]</b></summary>
796
+ <p>
797
+
798
+ ```js
799
+ import c from "chalk";
800
+ import { ytdlp } from "ytdlp";
801
+ import Fetch from "node-fetch";
802
+
803
+ ytdlp.video
804
+ .dl_Custom_Quality_Data({
805
+ title: api_data.youtube_search[0].TITLE, // optional
806
+ yturl: api_data.youtube_search[0].LINK, // required
807
+ folder: "mågneum", // optional
808
+ quality: "2160p", // required
809
+ })
810
+ .then((r) => {
811
+ console.log(
812
+ c.bgGreen("[PROMISE]:"),
813
+ c.bgGrey("audio.dl_Custom_Quality_Data()")
814
+ );
815
+ console.log(c.cyan("Resolution:"), c.gray(r.resolution));
816
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
817
+ console.log(c.cyan("Message:"), c.gray(r.message));
818
+ console.log(c.cyan("AudioUrl:"), c.gray(r.audiourl));
819
+ console.log(c.cyan("Url:"), c.gray(r.url));
820
+ })
821
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
822
+ ```
823
+
824
+ </p>
825
+ </details>
826
+
827
+ <details >
828
+ <summary><b>⚡Method [async/await]</b></summary>
829
+ <p>
830
+
831
+ ```js
832
+ import c from "chalk";
833
+ import { ytdlp } from "ytdlp";
834
+ import Fetch from "node-fetch";
835
+
836
+ (async () => {
837
+ const r = await ytdlp.video
838
+ .dl_Custom_Quality_Data({
839
+ title: api_data.youtube_search[0].TITLE, // optional
840
+ yturl: api_data.youtube_search[0].LINK, // required
841
+ folder: "mågneum", // optional
842
+ quality: "2160p", // required
843
+ })
844
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
845
+ if (r) {
846
+ console.log(
847
+ c.bgGreen("[ASYNC]:"),
848
+ c.bgGrey("video.dl_Custom_Quality_Data()")
849
+ );
850
+ console.log(c.cyan("Resolution:"), c.gray(r.resolution));
851
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
852
+ console.log(c.cyan("Message:"), c.gray(r.message));
853
+ console.log(c.cyan("AudioUrl:"), c.gray(r.audiourl));
854
+ console.log(c.cyan("Url:"), c.gray(r.url));
855
+ }
856
+ })();
857
+ ```
858
+
859
+ </p>
860
+ </details>
861
+
862
+ <details >
863
+ <summary><b>🎊Output Layout Example</b></summary>
864
+ <p>
865
+
866
+ ```
867
+ ✓ FETCHING....
868
+ 2.2 secs
869
+ [PROMISE]: audio.dl_Custom_Quality_Data()
870
+ Resolution: 2160p
871
+ Downloadpath: ./mågneum/
872
+ Message: INFO: stream starting.
873
+ AudioUrl: https://rr6---sn-gwpa-jj06.googlevideo.com/videoplayback?
874
+ Url: https://rr6---sn-gwpa-jj06.googlevideo.com/videoplayback?
875
+ Done in 14.79s.
876
+ ```
877
+
878
+ </p>
879
+ </details>
880
+
881
+ <!-- "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎" -->
882
+
883
+ <br>
884
+ <h1 align="center">
885
+ <b>📹 video.dl_Auto_Sorted_Data()
886
+ </b>
887
+ </h1>
888
+
889
+ - ⚠️ RETURNS AUDIO-LESS VIDEO METADATA ⚠️
890
+ - every youtube video metadata returned from server will be sorted into 'highest-possible', 'medium-possible' 'lowest-possible' categories.
891
+ - you can supply any of the above arguments and can get required download metadata.
892
+
893
+ <br />
894
+ <details open>
895
+ <summary><b>🗝️ @parameters/@arguments</b></summary>
896
+ <p>
897
+
898
+ ```js
899
+ /**
900
+ * @param {yturl} yturl -> "youtube-video-link"
901
+ * @param {string} resolution -> "highest-possible" || "lowest-possible"
902
+ */
903
+ ```
904
+
905
+ </p>
906
+ </details>
907
+
908
+ <details >
909
+ <summary><b>⚡Method [promise]</b></summary>
910
+ <p>
911
+
912
+ ```js
913
+ import c from "chalk";
914
+ import { ytdlp } from "ytdlp";
915
+ import Fetch from "node-fetch";
916
+
917
+ ytdlp.video
918
+ .dl_Auto_Sorted_Data({
919
+ title: api_data.youtube_search[0].TITLE, // optional
920
+ yturl: api_data.youtube_search[0].LINK, // required
921
+ sort: "highest-possible", // required
922
+ folder: "mågneum", // optional
923
+ })
924
+ .then((r) => {
925
+ console.log(
926
+ c.bgGreen("[PROMISE]:"),
927
+ c.bgGrey("audio.dl_Auto_Sorted_Data()")
928
+ );
929
+ console.log(c.cyan("Type:"), c.gray(r.type));
930
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
931
+ console.log(c.cyan("Message:"), c.gray(r.message));
932
+ console.log(c.cyan("AudioUrl:"), c.gray(r.audiourl));
933
+ console.log(c.cyan("Url:"), c.gray(r.url));
934
+ })
935
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
936
+ ```
937
+
938
+ </p>
939
+ </details>
940
+
941
+ <details >
942
+ <summary><b>⚡Method [async/await]</b></summary>
943
+ <p>
944
+
945
+ ```js
946
+ import c from "chalk";
947
+ import { ytdlp } from "ytdlp";
948
+ import Fetch from "node-fetch";
949
+
950
+ (async () => {
951
+ const r = await ytdlp.video
952
+ .dl_Auto_Sorted_Data({
953
+ title: api_data.youtube_search[0].TITLE, // optional
954
+ yturl: api_data.youtube_search[0].LINK, // required
955
+ sort: "highest-possible", // required
956
+ folder: "mågneum", // optional
957
+ })
958
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
959
+ console.log(c.bgGreen("[ASYNC]:"), c.bgGrey("video.dl_Auto_Sorted_Data()"));
960
+ console.log(c.cyan("Type:"), c.gray(r.type));
961
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
962
+ console.log(c.cyan("Message:"), c.gray(r.message));
963
+ console.log(c.cyan("AudioUrl:"), c.gray(r.audiourl));
964
+ console.log(c.cyan("Url:"), c.gray(r.url));
965
+ })();
966
+ ```
967
+
968
+ </p>
969
+ </details>
970
+
971
+ <details >
972
+ <summary><b>🎊Output Layout Example</b></summary>
973
+ <p>
974
+
975
+ ```
976
+ ✓ FETCHING....
977
+ 2.2 secs
978
+ [ASYNC]: audio.dl_Custom_Quality_Data()
979
+ Resolution: 2160p
980
+ Downloadpath: ./mågneum/
981
+ Message: INFO: stream starting.
982
+ AudioUrl: https://rr6---sn-gwpa-jj06.googlevideo.com/videoplayback?
983
+ Url: https://rr6---sn-gwpa-jj06.googlevideo.com/videoplayback?
984
+ Done in 14.79s.
985
+ ```
986
+
987
+ </p>
988
+ </details>
989
+
990
+ <!-- "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎" -->
991
+
544
992
  <br><br>
545
993
 
546
994
  <h1 align="center"><b>⚠️ Disclaimer</b></h1>
@@ -18,6 +18,7 @@ export default {
18
18
  no_yturl: "Not-A-Youtube-Link",
19
19
  wrong_quality: "Wrong Quality Provided.",
20
20
  Execjson_error: "Sorry Some Error Occured.\nTry Again!",
21
+ no_audio: "Current video doesn't have any audio+video support.",
21
22
  no_quality: "Sorry this video doesn't have the Quality requested.",
22
23
  video_no_quality: "Sorry this video doesn't have the Quality requested.",
23
24
  audioData_customQuality_no_url:
@@ -0,0 +1,80 @@
1
+ "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎";
2
+ // ╔⧉༻ ❝ ⚡ ⒸYT-DLP ⚡ ❞
3
+ // ║ Is A Python+ Javascript Youtube Audio Video Scrapper And Downloader Client
4
+ // ║ 🐞𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫𝐬: +918436686758, +917430922909
5
+ // ╚════════════╝
6
+
7
+ // MIT License
8
+ // Copyright (c) 2023 Mågnëum </>
9
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ // of this software and associated documentation files (the 'Software'), to deal
11
+ // in the Software without restriction, including without limitation the rights
12
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the Software is
14
+ // furnished to do so, subject to the following conditions:
15
+ "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎";
16
+ import c from "chalk";
17
+ import { ytdlp } from "ytdlp";
18
+ import Fetch from "node-fetch";
19
+
20
+ // To Get YouTube Video Simple Metadata
21
+ let songname = "4k audio dolby";
22
+ Fetch("https://magneum.vercel.app/api/youtube_sr?q=" + songname, {
23
+ method: "get",
24
+ headers: {
25
+ accept: "*/*",
26
+ "accept-language": "en-US,en;q=0.9",
27
+ "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
28
+ },
29
+ }).then(async function (response) {
30
+ const api_data = await response.json();
31
+ // console.log(api_data);
32
+
33
+ // Promise method
34
+ ytdlp.audio
35
+ .dl_Auto_Sorted_Data({
36
+ title: api_data.youtube_search[0].TITLE, // optional
37
+ yturl: api_data.youtube_search[0].LINK, // required
38
+ sort: "highest-possible", // required
39
+ folder: "mågneum", // optional
40
+ })
41
+ .then((r) => {
42
+ console.log(
43
+ c.bgGreen("[PROMISE]:"),
44
+ c.bgGrey("audio.dl_Auto_Sorted_Data()")
45
+ );
46
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
47
+ console.log(c.cyan("Message:"), c.gray(r.message));
48
+ })
49
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
50
+
51
+ // async/await method
52
+ (async () => {
53
+ const r = await ytdlp.audio
54
+ .Auto_Sorted_Data({
55
+ title: api_data.youtube_search[0].TITLE, // optional
56
+ yturl: api_data.youtube_search[0].LINK, // required
57
+ sort: "highest-possible", // required
58
+ folder: "mågneum", // optional
59
+ })
60
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
61
+ console.log(c.bgGreen("[ASYNC]:"), c.bgGrey("audio.dl_Auto_Sorted_Data()"));
62
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
63
+ console.log(c.cyan("Message:"), c.gray(r.message));
64
+ })();
65
+ });
66
+ ("◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎");
67
+ // ╔⧉༻ ❝ ⚡ ⒸYT-DLP ⚡ ❞
68
+ // ║ Is A Python+ Javascript Youtube Audio Video Scrapper And Downloader Client
69
+ // ║ 🐞𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫𝐬: +918436686758, +917430922909
70
+ // ╚════════════╝
71
+
72
+ // MIT License
73
+ // Copyright (c) 2023 Mågnëum </>
74
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
75
+ // of this software and associated documentation files (the 'Software'), to deal
76
+ // in the Software without restriction, including without limitation the rights
77
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
78
+ // copies of the Software, and to permit persons to whom the Software is
79
+ // furnished to do so, subject to the following conditions:
80
+ ("◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎");
@@ -0,0 +1,83 @@
1
+ "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎";
2
+ // ╔⧉༻ ❝ ⚡ ⒸYT-DLP ⚡ ❞
3
+ // ║ Is A Python+ Javascript Youtube Audio Video Scrapper And Downloader Client
4
+ // ║ 🐞𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫𝐬: +918436686758, +917430922909
5
+ // ╚════════════╝
6
+
7
+ // MIT License
8
+ // Copyright (c) 2023 Mågnëum </>
9
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ // of this software and associated documentation files (the 'Software'), to deal
11
+ // in the Software without restriction, including without limitation the rights
12
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the Software is
14
+ // furnished to do so, subject to the following conditions:
15
+ "◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎";
16
+ import c from "chalk";
17
+ import { ytdlp } from "ytdlp";
18
+ import Fetch from "node-fetch";
19
+
20
+ // To Get YouTube Video Simple Metadata
21
+ let songname = "4k audio dolby";
22
+ Fetch("https://magneum.vercel.app/api/youtube_sr?q=" + songname, {
23
+ method: "get",
24
+ headers: {
25
+ accept: "*/*",
26
+ "accept-language": "en-US,en;q=0.9",
27
+ "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
28
+ },
29
+ }).then(async function (response) {
30
+ const api_data = await response.json();
31
+ // console.log(api_data);
32
+
33
+ // Promise method
34
+ ytdlp.audio
35
+ .dl_Custom_Quality_Data({
36
+ title: api_data.youtube_search[0].TITLE, // optional
37
+ yturl: api_data.youtube_search[0].LINK, // required
38
+ folder: "mågneum", // optional
39
+ sort: "high", // required
40
+ })
41
+ .then((r) => {
42
+ console.log(
43
+ c.bgGreen("[PROMISE]:"),
44
+ c.bgGrey("audio.dl_Custom_Quality_Data()")
45
+ );
46
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
47
+ console.log(c.cyan("Message:"), c.gray(r.message));
48
+ })
49
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
50
+
51
+ // async/await method
52
+ (async () => {
53
+ const r = await ytdlp.audio
54
+ .dl_Custom_Quality_Data({
55
+ title: api_data.youtube_search[0].TITLE, // optional
56
+ yturl: api_data.youtube_search[0].LINK, // required
57
+ folder: "mågneum", // optional
58
+ sort: "high", // required
59
+ })
60
+ .catch((error) => console.log(c.bgRed("ERROR: "), c.gray(error.message)));
61
+ console.log(
62
+ c.bgGreen("[ASYNC]:"),
63
+ c.bgGrey("ausio.dl_Custom_Quality_Data()")
64
+ );
65
+ console.log(c.cyan("Downloadpath:"), c.gray(r.downloadpath));
66
+ console.log(c.cyan("Message:"), c.gray(r.message));
67
+ })();
68
+ });
69
+ ("◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎");
70
+ // ╔⧉༻ ❝ ⚡ ⒸYT-DLP ⚡ ❞
71
+ // ║ Is A Python+ Javascript Youtube Audio Video Scrapper And Downloader Client
72
+ // ║ 🐞𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫𝐬: +918436686758, +917430922909
73
+ // ╚════════════╝
74
+
75
+ // MIT License
76
+ // Copyright (c) 2023 Mågnëum </>
77
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
78
+ // of this software and associated documentation files (the 'Software'), to deal
79
+ // in the Software without restriction, including without limitation the rights
80
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
81
+ // copies of the Software, and to permit persons to whom the Software is
82
+ // furnished to do so, subject to the following conditions:
83
+ ("◎☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱[ ву mågneum ]☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱☱◎");