From 638b1d32fc4453b51624c66623c6b7cb778f7fa5 Mon Sep 17 00:00:00 2001 From: toiletclogger69 <96914066+toiletclogger69@users.noreply.github.com> Date: Sun, 17 Jul 2022 14:33:56 +0200 Subject: [PATCH] Fix issue with name with BF4 --- README.md | 63 +++++++++++++++++ doc/url1.png | Bin 0 -> 11571 bytes doc/url2.png | Bin 0 -> 8602 bytes doc/url3.png | Bin 0 -> 3648 bytes eh.py | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++ urls.txt | 1 + 6 files changed, 252 insertions(+) create mode 100644 README.md create mode 100644 doc/url1.png create mode 100644 doc/url2.png create mode 100644 doc/url3.png create mode 100644 eh.py create mode 100644 urls.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..38b3b97 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# eh_download +dgeh, Download Gallery E-hentai. + +GUI gallery downloader for e-hentai and possibly nhentai + +Once you downloaded all the files you want, I suggest using this script : https://gist.github.com/toiletclogger69/d08164cd8c978f7a1fc2f12ee9e4f15a to easily read the gallery afterward. + +## **DOWNLOAD THE EXE HERE [dgeh.zip](https://github.com/toiletclogger69/eh_download/files/8010577/dgeh.zip)** + +## requirements (as an exe) +None, just click on the exe + +## requirements (as a python script) +``` +pip install gooey +pip install requests +``` + +--- + +## Screenshots : +The GUI : + +![Screen1](doc/url1.png) + +The result of downloading 4 gallery : + +![Screen2](doc/url2.png) + +In each folder every picture : + +![Screen3](doc/url3.png) + +--- + +## Fields +**Text area** : Put a list of url inside the box, eg: +``` +https://e-hentai.org/g/lots_of_number1/lots_of_number1/ +https://e-hentai.org/g/lots_of_number2/lots_of_number2/ +https://e-hentai.org/g/lots_of_number3/lots_of_number3/ +``` + +It only accept url from e-hentai (eg : https://e-hentai.org/g/lots_of_number/lots_of_number/) and nhentai (eg : https://nhentai.net/g/lots_of_number/) + +**Replace character** : Remove every | ? ! and other character that are not accepted in window folder name. + +## Use a standalone script +Go into [eh.py](eh.py), set `TRUE_IF_CLI` to True. + +Add a text file named "urls.txt" in your current folder, put every urls inside then execute the script with "python eh.py". + +## Issue with nhentai +I can't access easily that website so I can't test if the script works. + +In theory it should, if you get an error saying forbidden access (Cloudflare protection against bot) I can't do anything about it. + +## How to build the exe +`pip install pyinstaller` + +go into the current folder > + +`pyinstaller build.spec` diff --git a/doc/url1.png b/doc/url1.png new file mode 100644 index 0000000000000000000000000000000000000000..c5f5e24859479f64d106595161c7f377217c617d GIT binary patch literal 11571 zcmeHtXIN8F*6y(&N>va+5U>FvRf=>XiqZsZG!X*Qq$5ZTBsM^#N=HgWniNIpJwgCQ znlvfFM0yPgHGzcWo-i|CnLBsx-0$z5JWt@9eRkH~tFQI$6LHH(hnfa_+>r39~{X(oAdzux6kK}&Q;)31Q=Ae_7p%wsqiDjkQGJ*F;ymT#m0DuF{ z`0o4W`N19lB){uvYuyX5#{Z_kP7P(wJ>D(r?ZL^S&dalQil*s}bSR(9=v2Sd{wKYw zOP-A^eLm;q!Klp7YV}5+C872wUmT0t&$pkWdEYm)ugSsb2ieeqZd~6TzOBbyx>QvX z>Hak)E&Rcjr3tP`(|6(5f@$@j&L&)AGj*V#hcsAtXgJ)(w^)F-=!0|;NWhmuNZa(S zIo{X_zXc~vOE=227=3NhKy!7$n4Y9S`zEHjnP%*YQpkmj*?ZoLAIUdN5A0SP{(CmW`K`5j1!VRUBBKqO#3p-u6?j@C{zf9_6r9VOK7*p^ou$jE;n}(2x0gjO|F#lp;RG^nLng$y zZY#A+bDv{D`ShwC7x5dqcNBKcSo5|mS>&P2SVhT| z{Wo*EVyjNKy!H*-H;h@VZm=z60r=(`=r|c8<{|3{yXaZDn=3DoFD+9ag$79cTA;&B ztou(s=5sv&xEOtE9n%;8QtbD9IsuXsw(>zYbVAJX?3O)-N)UczG5yG5BBiGK92KzX z8Z;q`?3Y>nydV7%scWBAo7N%5S$X=#)lQm2uXfWhI3Vk|C`OgbkuD#=zG{(a+H}== z&g+sj0<)A;+dY4;VfhGPr(fEBeg56;GvS?VD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1?QJJK$-#0#Auvhcas2z?X$k zZIciT$a?JUxFJ*+vUuR>>R(h6ODw19pW7CLEPzAT_p}sCWR>eRTa$=xh*Qw6-v_Mh zaW^FbW|_b|#>N?i1cpKW2*X^`8GB@;{l7DYe^CnmCiY((=-)E?uMYBW)A;A65&tF} zSyjU5TV4J~0qEcI{pa%iM?w4lFPQ}!Lv|~wt}Y1uEx;4?2GjQPGTHyb=7y7$K_5U(4;rkv`722<{SL`eh!~``6h@o9+ zk@K4an|Pr|9)YO%D$Y^HOrQ)3A7~;N&Zd^i?OT?XNu>jU><~f(JJKw~ z6pwtp2ysr^o3kZ?X}CJ9YmJtfY5=Ra54uS*qiyBJpPKYZl$5E1(3G3LHf1?G z!;h6(dJ!zq@-pf<&D;swY`tmRjR1bYsuHZOysmAcJyUI7zwbnu>O9Vul9`|6)}Ct2 z$H@g1wZ0*8??Cq3zI4#!xm`f2IFVKF^0)QjWS;t3qIBD{`TkQ@F=)TK2c=tQJe@X6 zr@*%f>a}>=WPi;2~6u+6j25Q(M4AN#q1S z2tn3l@1(fZcAc-IF^$}UCt}Bgy sZBI^c-`P01289R+SQ=FuNYm(Cx8BF>7sO)07o7pU>qgq2uG&2RU$w0rm;e9( literal 0 HcmV?d00001 diff --git a/doc/url2.png b/doc/url2.png new file mode 100644 index 0000000000000000000000000000000000000000..ecc0ebb3428c801a89cb46fab00de0629ea1a0a4 GIT binary patch literal 8602 zcmdU#Ra6|^w(rqk0TSFva0?m;ngD6sf;CQXm&TnSA<$^Bpp7){?(Xh1&=A}`1Pc~U zCwsq~{hd3;x#K?FhwAE@qiU_HS+nN+&)-RbE%4fiJUCQuwHs@@vw_mVXXMmTmjGC1d6|KjlKmv!;}`4P~qLb zYYSuz{`PfRPFQZ0jDD`FM8Ce|NY|&rPma0kos@_n=bfY0aa}_^6T{=B?lUxrXK2is z$$N;M1c)LGO!LQ35cm&+JM{7Lu7&H+rVoA7>XQH)$QM zQrUk-c}7LK2*%s=75wET_{&=Gm(#+d@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fi3dwiBfN;KNjU?pbsI*6TssVCNoTuaDmFUxln>V`Im`*=F9q@ zON*YjWAANL3&nHnFzdlsu`$UqtmpgP5$VT>im|vOvLw+!5i({TbZN}R)hP+ zligLYJ2{`a{2xld0AQsD?No$#8e-!_mSePBApGoBfH#=#wrhH{#uq?2`qPiPuBv3yn za()3SkBrMb-XaVD5i+9XE(Y0FS8GlmlUkqDo&8>nV`rq?7^W Il14%Q1#Q#SfB*mh literal 0 HcmV?d00001 diff --git a/doc/url3.png b/doc/url3.png new file mode 100644 index 0000000000000000000000000000000000000000..a9aa3e19580bfaa2eb216b007e2397a3cb0a71c8 GIT binary patch literal 3648 zcmbtXdpOhkADnO?DO6%9O0IK@EXs-I zy4t}p*CN+3naq8^?>JAt^XKn(&Yow__Wpi9&-T8&F7I!WrMaxzJno>t=}1uZ)(a<4R}<}&OEsAhTKFQ{o3IxCtG5wP#|*) zuOi!$T5#t^zEyhoN$d-pb6(bMBV%i?mIu2r)ZCUDA?OJ=Y4fp}E2 zJde21QHo0PN`_4KuaROeZDuM~hSY~xF|4`vq4WpEE915yKZJ#ao12^C;^L0f?@PKF z#$ArW_7kYnOAO>;E$WYjS=>x*qh#cd9&CG8U*q>5_K~@V4<4+bYRxFfyM?vhkkMOh zIl^8TOlQ&AGxm1Qo7vr46G>uW!;3Vk1&R5Q5TIb2WkOnAG&N2?T&?aIm0LsA($vh3 z*zKTVkZ0Og9Krfj8ZcLln~vBhOE_G*Mhh9s&u42R)$W@&+Sf&1?LiLU z+cT9}Pr#xO=v0qHsUvlHlc=6%EGO5Sc3mZKqnc0}$DU?9A{J9s`_gi>k*ca90`a2C zF3!%*4OlY1nJW?TJ^uZT8%yhjeI-tr5gpV&EJymH{;WeZ z)KY1*13&7(JW}Azjy>*iNIyFJ>*R>$LVGX`vpTV&oubqZ3GUDSWIL2zyb;oechy?z z?Q$Ak>+LMl`u=*|(kM9EHgM_+BXacjfM=0$jUo*31!JByl2}@QKgsuU(aOpzLe-C} zw3+%1x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?Ar#(E8kw{I|2SnQY8yq7gwXGmgPNn`K zd&JF6)tC}8qnV5N;(Oy;Pei?H3*jkEoJN2BsEZb@7mno+#tIOs-yuR%X+O6R0f74O zc8D2TbZsBu+0P0M@|do8lK1W6go{Le?6RgtH@rWa;8)Yqg(U_lmkk^Rs9|`I1D@l} z+4BOUncLK%K3-NIIL#^TJU+x=ti;y6O=2{Kzlw+^erhQ>q<%+Gno?v!G=FkQSXvAi zml?jA>1zctHcv#Qr>4g15o{D}ZES3;t*tSbgGCPC<~pYz(%zV-X84bMvaPI(YJcEW zHqwima+^5Wje2^*vl^KTuXQ@fD*L0;>q7+r@&1ng_^yAUZJn_GI>31H5eQe~cArC}=Oqb4`b!u|l7_UWTF~5PQpt<3MOpBQjARaE!MG@;i?4 zQx}E+jeBcK{1ncnM{$Y(MjGO>(A_cc_$?nliX&MVDPRno%kD#;Cqf;=B5(A!;3q<0`HI##w5(pt8ydav;Zd zmY$ygj8p7Uw|3J8K?O5 z(xOMORJgAIypA1vSzNr^ws>)QBG_#1LZMMxEn}*ve~{$SUfJhAdp1~wndJpob>(1V z`KN6kJvCX{p_&^N6Oj)S%ukejh*t`h0|P9o--*R3l7GzyFePA$CJ#7Amf(8mpIiho zJw~QYl!D%N07^!JA;WkVEI2x#)-C`P#Zg$4-;TrmZ5II7!NDbf5{(09wO!#3B>uZG z{2vg3!~3V5#Y+}V{l9W>sF^N_$!_1Ci!P)>%@_7T&Yc%Xxx7&bSn X&EYss#)twu^?}fa<_4vDZa4k|#`W^x literal 0 HcmV?d00001 diff --git a/eh.py b/eh.py new file mode 100644 index 0000000..ea12762 --- /dev/null +++ b/eh.py @@ -0,0 +1,188 @@ +#! python3 +""" +############################################################### +made by toiletclogger69 +https://github.com/toiletclogger69/eh_download + +pip install gooey requests bs4 + +to run : +python eh.py (launch the gooey app) + +if you don't want to use gooey and only this script, you can call download_gallery directly, eg : +download_gallery(url_to_the_gallery_you_want, true) + +you can set TRUE_IF_CLI = True if you want to use the script directly with a text file "urls.txt" containing all urls + +############################################################### + +download a list of gallery from e-hentai +you can pass a list of url in the text area and it will download every page, +and put them in their respective gallery folder + +############################################################### +3~4s between the download of each page, or you get flagged as a bot + +the images downloaded are the sample resolution for eh (1280 * xxxx), if you want better resolution go with a torrent +""" + +from sys import stdout, exit +from os import path, makedirs, getcwd +from time import sleep +from random import randint + +import requests +from bs4 import BeautifulSoup +from gooey import Gooey, GooeyParser + + +# python -m venv env && env\Scripts\activate.bat + + +# change this var to change the folder name +GALLERY_FOLDER = "doujins" + +''' add a urls.txt file in the current folder, add every urls inside, separated by a newline eg: +https://e-hentai.org/g/lots_of_number1/lots_of_number1/ +https://e-hentai.org/g/lots_of_number2/lots_of_number2/ +https://e-hentai.org/g/lots_of_number3/lots_of_number3/ +then set this to True and execture the script with python eh.py''' +TRUE_IF_CLI = False +# TRUE_IF_CLI = True + + +headers = {"User-Agent" : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36'} + + +############################################################### + + +def download_gallery(url='', true_if_replace_name=False) -> int: + html_request = requests.get(url, headers=headers) + html_request.raise_for_status() + html_page = BeautifulSoup(html_request.text, 'html.parser') + + # if wrong url, or error 404 + if "Key missing, or incorrect key provided." in html_page.text or "error 404" in html_page.text: + print(f"couldn't find {url}") + print("-1%") + stdout.flush() + sleep(6) + return + + # find title + title_bs4 = html_page.find('title') + title_gallery = title_bs4.text.split(" - E-Hentai Galleries")[0] + + # find number of pages + meta = html_page.find_all(class_ ="gdt2") + number_of_page = [x for x in meta if "pages" in x.text][0].text + number_of_page = int(number_of_page.split(" pages")[0]) + + # find first page url + first_page = html_page.find_all(class_ ="gdtm")[0] + url_next_page = first_page.find('a')['href'] + + # create the folder + if true_if_replace_name: + title_gallery = ''.join(char for char in title_gallery if (char.isalnum() or char in r"_-[]()\{\} ")) + gallery_path = path.join(getcwd(), GALLERY_FOLDER, title_gallery) + makedirs(gallery_path, exist_ok=True) + + # informations + print("\n\n============================\n") + print(f'\t{number_of_page} pages - {url}') + print(f'\t{title_gallery}') + print("\n----------------------------\n") + + for page_number in range(number_of_page): + # don't touch the sleep amount or you will get flagged as a bot + sleep(randint(3, 4)) + + html_request = requests.get(url_next_page, headers=headers) + html_request.raise_for_status() + html_page = BeautifulSoup(html_request.text, 'html.parser') + + # find the picture div + element_image = html_page.find("div", {"id": "i3"}) + + # find the next url page link + element_link = element_image.find('a') + url_next_page = element_link['href'] + + # find the current picture url + element_source = element_image.find('img') + url_image = element_source['src'] + + # 0001.jpg, 0049.png, etc. + file_name = path.basename(f"{str(page_number):0>4}.{url_image.split('.')[-1]}") + + content_image = requests.get(url_image, headers=headers) + with open(path.join(gallery_path, file_name), 'wb+') as file: + for chunk in content_image.iter_content(100000): + file.write(chunk) + print(f"{file_name}\t\t{int((page_number / (int(number_of_page) - 1)) * 100):0>2}%") + + stdout.flush() + return 1 + + +@Gooey(progress_regex=r"(-?\d+)%$" + , disable_progress_bar_animation=True + , program_name='dgeh' + , requires_shell=False + , program_description="Download gallery on eh" + , menu=[{'name': 'About' + , 'items': [{ + 'type': 'AboutDialog' + , 'menuTitle': 'About' + , 'version': '1.1.0' + , 'copyright': '2021' + , 'website': 'https://github.com/toiletclogger69/eh_download' + , 'developer': 'toiletclogger69' + }] + }] +) +def main(): + parser = GooeyParser(prog="gallery eh downloader") + parser.add_argument('urls' + , metavar='liste of url' + , help='urls are separated by a newline, no blank line allowed' + , widget='Textarea' + , gooey_options={'height': 200, }) + parser.add_argument('-true_if_window_compatible' + , metavar='Replace character' + , action='store_true' + , required=False + , help='Some character ( / | ? ! etc. ) in gallery title are not valid in windows file name, if set those character will be removed') + args = parser.parse_args() + liste_urls = args.urls.split('\n') + + for current_url in liste_urls: + if current_url and current_url.startswith("http"): + download_gallery(current_url, args.true_if_window_compatible) + print("") + print("") + print("-1%") + stdout.flush() + sleep(2) + + +if __name__ == "__main__": + # https://e-hentai.org/g/2228972/6126f6c5b4/ + # フレイラお姉ちゃんが実験台にされてひどい目に合うお話 + # https://e-hentai.org/g/2213861/40252db7b3/ + # [ChCrumbles] Network I/O [Hi-Res][Still be Continuing ?...] + + try: + if TRUE_IF_CLI: + """ Read every url from a text file """ + with open("urls.txt", 'r') as file_text: + list_url = file_text.readlines() + for current_url in list_url: + if current_url and current_url.startswith("http"): + download_gallery(current_url, True) + else: + exit(main()) + except KeyboardInterrupt: + print("\nEnd program") diff --git a/urls.txt b/urls.txt new file mode 100644 index 0000000..2cded05 --- /dev/null +++ b/urls.txt @@ -0,0 +1 @@ +https://e-hentai.org/g/2228972/6126f6c5b4/ \ No newline at end of file