karim0209

termux-url-opener 20082022

Aug 20th, 2022 (edited)
1,299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 11.64 KB | None | 0 0
  1. #!/data/data/com.termux/files/usr/bin/bash
  2. echo "File download movie video code 18 file press 00"
  3. echo "For Audio playlist items    in folder press 111"
  4. echo "File download best video file   press 0"
  5. echo "File download best short video file   press 99"
  6. echo "For instagram photos rang download    press 1"
  7. echo "For  single  Audio   file in JukeBox press 2"
  8. echo "File download video files in Folder   press 3"
  9. echo "For Audio playlist items    in folder press 4"
  10. echo "File download using     Wget          press 5"
  11. echo "File download using     Aria2c        press 6"
  12. echo "For Audio cut using     ffmpeg        press 7"
  13. echo "for item files in folder for playlist press 8"
  14. echo "For Download     instagram    photos  press 9"
  15. echo "For Download    instagram photo item  press 10"
  16. echo "For Download     spotify playlist     press 11"
  17. echo "For Download     spotify    songs     press 12"
  18. echo "For Download     spotify       Album  press 13"
  19. echo "For gdrivedl    download g    file    press 14"
  20. echo "For url mp3 file download using arial press 15"
  21. echo "For AIR mp3 file download using arial press 16"
  22. echo "For gdrivedl    download g    file    press 17"
  23. echo "For .pdf file download using arial press 18"
  24. echo "For all pdf files in a url download using arial press 19"
  25. echo "For Audio playlist of channel   in folder press 20"
  26. echo "download using THAu&Fino press 21"
  27. echo "Download .m4a file in Dristi Topics press 22"
  28. echo "download using THAu press 23"
  29.  
  30. command="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/JukeBox/%(title)s -- %(uploader)s.%(ext)s' -i --external-downloader aria2c --external-downloader-args '-c -x 16 -s 16 -k 1M --file-allocation=none'"
  31. dfol="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/StudyMaterials/DristiIASm4a/%(title)s.%(ext)s' -i"
  32. command1="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/JukeBox/%(title)s -- %(uploader)s.%(ext)s' -i"
  33. folder="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/JukeBox/%(playlist)s/%(title)s -- %(uploader)s.%(ext)s' -i --external-downloader aria2c --external-downloader-args '-c -x 16 -s 16 -k 1M --file-allocation=none'"
  34. dloader="--external-downloader aria2c --external-downloader-args '-c -x 16 -s 16 -k 1M --file-allocation=none'"
  35. Grange="--dest ~/storage/shared/Gallery --range"
  36. Gl="--dest ~/storage/shared/Gallery"
  37. read option
  38.  
  39. if [ "$option" -eq "00" ]
  40. then
  41.     echo "$command -f 18" > ~/.config/youtube-dl/config
  42.     youtube-dl $1
  43.  
  44. elif [ "$option" -eq "111" ]
  45. then
  46.     echo -e "Enter Playlist items You want \n"
  47.     read items
  48.     echo "$folder -f 140  --playlist-items $items" > ~/.config/youtube-dl/config
  49.     youtube-dl $1
  50.  
  51. elif [ "$option" -eq "0" ]
  52. then
  53.     echo "$command -f best" > ~/.config/youtube-dl/config
  54.     youtube-dl $1
  55.  
  56. elif [ "$option" -eq "99" ]
  57. then
  58.     echo $1 | sed 's,shorts/,watch?v=,g'
  59.  
  60.     youtube-dl $(echo $1 | sed 's,shorts/,watch?v=,g')
  61.  
  62. elif [ "$option" -eq "1" ]
  63. then
  64.     echo -e "Enter range u want just wait"
  65.     gallery-dl -d ~/storage/shared/Gallery $1 | sed 's,/?utm/_medium/=copy/_link,,g'
  66.  
  67. elif [ "$option" -eq "2" ]
  68. then
  69.     echo "$command -f 140 " > ~/.config/youtube-dl/config
  70.     youtube-dl $1
  71.  
  72. elif [ "$option" -eq "3" ]
  73. then
  74.     echo -e "You want Youtube best video Q press 1 \n"
  75.     echo -e "You want Youtube video code 18 Q press 2 \n"
  76.     read opt
  77.     if [ "$opt" -eq "1" ]
  78.     then
  79.     echo -e "Enter Playlist Number You want to items \n"
  80.     read items
  81.     echo "$folder -f best --playlist-items $items" > ~/.config/youtube-dl/config
  82.     youtube-dl $1
  83.     elif [ "$opt" -eq "2" ]
  84.     then
  85.     echo -e "Enter Playlist Number You want to items \n"
  86.     read items
  87.     echo "$folder -f 18 --playlist-items $items" > ~/.config/youtube-dl/config
  88.     youtube-dl $1
  89.     fi
  90. elif [ "$option" -eq "4" ]
  91. then
  92.     echo -e "You want Youtube audio    press 1 \n"
  93.     echo -e "You want Soundcloud audio press 2 \n"
  94.     read opt
  95.     if [ "$opt" -eq "1" ]
  96.     then
  97.     echo -e "Enter Playlist items You want \n"
  98.     read items
  99.     echo "$folder -f 140  --playlist-items $items" > ~/.config/youtube-dl/config
  100.     youtube-dl $1
  101.     elif [ "$opt" -eq "2" ]
  102.     then
  103.     echo -e "Enter Playlist items You want \n"
  104.     read items
  105.     echo "$folder -f hls_mp3_128 --playlist-items $items" > ~/.config/youtube-dl/config
  106.     youtube-dl $1
  107.     fi
  108. elif [ "$option" -eq "5" ]
  109. then
  110.     echo "-V -O" > ~/.config/youtube-dl/config
  111.     wget -c $1 -P '/data/data/com.termux/files/home/storage/shared/Youtube'
  112. elif [ "$option" -eq "6" ]
  113. then
  114.     echo "-c -x 16 -s 16 -k 1M" > ~/.config/youtube-dl/config
  115.     aria2c $1 --file-allocation=none -d '/data/data/com.termux/files/home/storage/shared/Youtube'
  116. elif [ "$option" -eq "7" ]
  117. then
  118.     echo -e "Enter start time \n"
  119.     read start
  120.     echo -e "Enter end time duration\n"
  121.     read end
  122.     echo -e "Enter output file name \n"
  123.     read name
  124.     echo "-g -f 140" > ~/.config/youtube-dl/config
  125.     cd ~/storage/shared/Youtube
  126.     ffmpeg -i $(youtube-dl $1) -ss $start -t $end -c copy $name
  127. elif [ "$option" -eq "8" ]
  128. then
  129.     echo -e "Available formates \n"
  130.     youtube-dl -F $1
  131.     echo -e "Enter formates like 136+249 \n"
  132.     read format
  133.     echo -e "Enter Playlist Number You want to items \n"
  134.     read items
  135.     echo -e "$downloader  --no-part --no-mtime -o '/data/data/com.termux/files/home/storage/shared/Youtube/%(playlist)s/%(title)s.%(ext)s' -i -f $format --playlist-items $items" > ~/.config/youtube-dl/config
  136.     youtube-dl $1
  137. elif [ "$option" -eq "9" ]
  138. then
  139.     echo -e "Downloading photos .... \n"
  140.     gallery-dl -u dkarimulla2011@gmail.com -p Allah@786 $Gl $1 | sed 's,/?igshid=.*,,g'
  141. elif [ "$option" -eq "10" ]
  142. then
  143.     echo -e "Enter specifying which images to download. For example '5-10' or '1,3-5 ... \n"
  144.     read num
  145.     echo -e "Downloading photos .... \n"
  146.     gallery-dl -u dkarimulla2011@gmail.com -p Allah@786 $Grange $num $1 | sed 's,/?igshid=.*,,g'
  147. elif [ "$option" -eq "11" ]
  148. then
  149. #    cd /data/data/com.termux/files/home/storage/shared/spotify-music
  150. #    echo -e "please wait Downloading playlist text file.... \n"
  151. #    spotdl -p $1 && pwd && ls
  152. #    echo -e "please Enter moving .txt file in folder \n"
  153. #    read fname
  154. #    mkdir $fname-$(echo "$(date +%A%d-%B-%Y-Time-%I-%M)")
  155. #    mv *.txt $fname-*
  156. #    cd $fname-* && pwd && ls
  157. #    echo -e "Type playlist name only without extention  \n"
  158. #    read file
  159. #    spotdl -l $file.txt && rm *.txt
  160.      spotdl $1
  161. elif [ "$option" -eq "12" ]
  162. then
  163.     echo -e "Please wait Downloading spotify song...\n"
  164.     cd storage/shared/spotify-music && ls
  165.     echo "" > ~/.config/youtube-dl/config
  166.     spotdl -s $1
  167. elif [ "$option" -eq "13" ]
  168. then
  169.     cd /data/data/com.termux/files/home/storage/shared/spotify-music
  170.     echo -e "please wait Downloading Album text file.... \n"
  171.     spotdl -a $1 && ls
  172.     echo -e "please Enter moving .txt file in folder \n"
  173.     read fname
  174.     mkdir $fname-$(echo "$(date +%A%d-%B-%Y-Time-%I-%M)")
  175.     mv *.txt $fname-*
  176.     cd $fname-* && pwd && ls
  177.     echo -e "Type playlist name only without extention  \n"
  178.     read file
  179.     spotdl -l $file.txt && rm *.txt
  180. elif [ "$option" -eq "14" ]
  181. then
  182.      cd ~/storage/shared/Youtube && ls && gdrivedl $1
  183. elif [ "$option" -eq "15" ]
  184. then
  185.     cd /data/data/com.termux/files/home/storage/shared/youtube
  186.     ls
  187.     echo -e "please wait mp3 file downloading.... \n"
  188.     aria2c -c -x 16 -s 16 -k 1M $(lynx -listonly -nonumbers -dump $1 | grep mp3)
  189.     ls
  190. elif [ "$option" -eq "16" ]
  191. then
  192.     cd /data/data/com.termux/files/home/storage/shared/AIR
  193.     ls
  194.     echo -e "please wait mp3 file downloading.... \n"
  195.     aria2c -c -x 16 -s 16 -k 1M $1
  196.     ls
  197. elif [ "$option" -eq "17" ]
  198. then
  199.      cd ~/storage/shared/Youtube && ls && gdrivedl $(lynx -listonly -nonumbers -dump $1 | grep drive)
  200. elif [ "$option" -eq "18" ]
  201. then
  202.     cd /data/data/com.termux/files/home/storage/shared/Study-Materials
  203.     ls
  204.     echo -e "please wait creating directory"
  205.     mkdir $(echo "$(date +%d-%A-%m-%B-%Y-%X%P)" | sed 's, ,-,g')
  206.     ls
  207.     echo -e "Entering Into the creating directory"
  208.     read folder
  209.     cd $folder
  210.     echo -e "please wait .pdf file downloading.... \n"
  211.     aria2c -c -x 16 -s 16 -k 1M $(lynx -listonly -nonumbers -dump $1 | grep .pdf )
  212. elif [ "$option" -eq "19" ]
  213. then
  214.     cd /data/data/com.termux/files/home/storage/shared/Study-Materials
  215.     ls
  216.     echo -e "Enter folder name u want please wait creating directory"
  217.     read fname
  218.     mkdir $fname-$(echo "$(date +%d-%A-%m-%B-%Y-%X%P)" | sed 's, ,-,g')
  219.     cd $fname-*
  220.     pwd
  221.     ls
  222.     echo -e "Enter url contain direct pdf files in gdrive 0"
  223.     echo -e "Enter url contain direct pdf files 1"
  224.     echo -e "Enter url contain next level web page pdf file 2"
  225.     read opt
  226.     if [ "$opt" -eq "0" ]
  227.     then
  228.     lynx -listonly -nonumbers -dump $1
  229.     echo -e "Enter links to extract name and enter .txt file name like link name\n"
  230.     read link name
  231.     lynx -listonly -nonumbers -dump $1 | grep $link > $name.txt
  232.     echo -e "please wait .pdf files downloading gdrivedl.... \n"
  233.     while read file;do gdrivedl $file;done < $name.txt
  234.     elif [ "$opt" -eq "1" ]
  235.     then
  236.     lynx -listonly -nonumbers -dump $1
  237.     echo -e "Enter links to extract name and enter .txt file name like link name\n"
  238.     read link name
  239.     lynx -listonly -nonumbers -dump $1 | grep $link > $name.txt
  240.     echo -e "please wait .pdf file downloading.... \n"
  241.     while read file;do aria2c -c -x 16 -s 16 -k 1M $file;done < $name.txt
  242.     elif [ "$opt" -eq "2" ]
  243.     then
  244.     lynx -listonly -nonumbers -dump $1
  245.     echo -e "Enter links to extract name and enter .txt file name like link name\n"
  246.     read link name
  247.     lynx -listonly -nonumbers -dump $1 | grep $link > $name.txt
  248.     echo -e "please wait .pdf file downloading.... \n"
  249.     while read file;do aria2c -c -x 16 -s 16 -k 1M $(lynx -listonly -nonumbers -dump $file | grep .pdf );done < $name.txt
  250.     fi
  251. elif [ "$option" -eq "20" ]
  252. then
  253.     echo "$folder --yes-playlist -f 140" > ~/.config/youtube-dl/config
  254.     youtube-dl $1
  255. elif [ "$option" -eq "21" ]
  256. then
  257.     echo -e "paste here your single url THAu press 1"
  258.     echo -e "paste here your single url FinoU press 2"
  259.     read opt
  260.     if [ "$opt" -eq "1" ]
  261.     then
  262.     cd ~/storage/shared/IAS/TheHindu/;ls
  263.     echo -e "$pwd\n Downloading web content ...."
  264.     ls
  265.     echo -e "paste here your single url"
  266.     THAu
  267.     echo -e "your single url data downloaded"
  268.     rm New*
  269.     sleep 3
  270.     elif [ "$opt" -eq "2" ]
  271.     then
  272.     cd ~/storage/shared/StudyMaterials/Finalogy
  273.     echo -e "$pwd\n Downloading web content ...."
  274.     ls
  275.     echo -e "paste here your single url"
  276.     FinoU
  277.     rm NewFilename*
  278.     echo -e "your single url data downloaded"
  279.     sleep 3
  280.     fi
  281. elif [ "$option" -eq "22" ]
  282. then
  283.     youtube-dl $dfol -f 140 $1 > ~/.config/youtube-dl/config
  284. elif [ "$option" -eq "23" ]
  285. then
  286.     cd ~/storage/shared/IAS/TheHindu/;ls
  287.     echo -e "$pwd\n Downloading web content ...."
  288.     ls
  289.     echo -e "paste here your single url"
  290.     THAu
  291.     echo -e "your single url data downloaded"
  292.     rm New*
  293.     sleep 3
  294. fi
  295.  
  296.  
  297.  
  298.  
  299.  
  300. #/storage/emulated/0/Study-Materials/DristiIASm4a
  301.  
  302. #elif [ "$option" -eq "21" ]
  303. #then
  304. #    cd /data/data/com.termux/files/home/storage/shared/Study-Materials
  305. #    ls
  306. #    echo -e "Downloading web content ...."
  307. #    TheHinduArticle > $(touch $(echo "$(date +%A%d-%B-%Y-Time-%I-%M).txt"))
  308. #    txt2pdf --font /data/data/com.termux/files/home/DroidSerif-Regular.ttf $(echo "$(date +%A%d--%B-%Y-Time-%I-%M).txt") -o $(echo "$(date +%A%d-%B-%Y-Time-%I-%M).pdf")
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
Advertisement
Add Comment
Please, Sign In to add comment