Advertisement
Guest User

nhdl

a guest
Apr 24th, 2019
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.48 KB | None | 0 0
  1. #!/bin/bash
  2. #script uses RicterZ nhentai downloader @ https://github.com/RicterZ/nhentai to accept full url's opposed to just ID's. you can also just put in "fav" to enter your registered user name and password to download all of your saved "favorites" at nhentai.net
  3.  
  4. #
  5. #options for RicterZ nhentai downloader. uncomment the desired options. $VAR="" , where "" is blank is always "off" for the option.
  6. #besure to recomment anything (with the # character) you wish not to pass to the command
  7.  
  8. #CREATE CBZ FILE
  9. #CBZ=""
  10. CBZ="--cbz"
  11.  
  12. #DELETE SOURCE DOWNLOAD FILES AND DIRECTORY AFTER CREATING CBZ FILE
  13. DELCBZ=""
  14. #DELCBZ="--rm-original-dir"
  15.  
  16. #DO NOT CREATE HTML "index.html" FILE. (this file gives a web gui for offline viewing via your webbrowser)
  17. HTML=""
  18. #HTML="--nohtml"
  19.  
  20.  
  21.  
  22. echo " "
  23.  
  24. tput setaf 5; echo "Paste nhentai.net url and hit enter. type "login" to enter username and password to download favorites"
  25.  
  26. echo " "
  27.  
  28. echo "Please note that various options can be switched on and off by editing the variables at the bottom of this script file"
  29.  
  30. echo " "
  31.  
  32. tput sgr0
  33.  
  34. read URL
  35.  
  36. NHID=$(echo "$URL" | grep -Eo '[0-9]{1,6}')
  37.  
  38. if [ "$URL" = "login" ];
  39.  
  40. then
  41.  
  42.         tput setaf 5;   echo "type username"
  43.         tput sgr0
  44.                         read USR
  45.         tput setaf 5;   echo "type password"
  46.         tput sgr0
  47.                         read -s PAS
  48.  
  49. nhentai --login "$USR:$PAS" --download $CBZ $DELCBZ $HTML
  50.  
  51. else
  52.  
  53. nhentai --id=$NHID $CBZ $DELCBZ $HTML
  54.  
  55. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement