mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.48k stars 941 forks source link

[ExHentai] Image parse error #1094

Closed colpocleisis closed 3 years ago

colpocleisis commented 3 years ago

Lately I've been getting a lot of exhentai: Unable to parse image info errors

(DEBU) ←[0;37mexhentai: Page content:
{'p': 27, 's': 's/4ac8b4df7b/1768226-27', 'n': '<div class="sn"><a onclick="return load_image(1, \'25c7fc45a4\')" href="https://exhentai.org/s/25c7fc45a4/1768226-1"><img src="https://exhentai.org/img/f.png" /></a><a id="prev" onclick="return load_image(26, \'7d48a81580\')" href="https://exhentai.org/s/7d48a81580/1768226-26"><img src="https://exhentai.org/img/p.png" /></a><div><span>27</span> / <span>28</span></div><a id="next" onclick="return load_image(28, \'08f760efab\')" href="https://exhentai.org/s/08f760efab/1768226-28"><img src="https://exhentai.org/img/n.png" /></a><a onclick="return load_image(28, \'08f760efab\')" href="https://exhentai.org/s/08f760efab/1768226-28"><img src="https://exhentai.org/img/l.png" /></a></div>', 'i': '<div>027.png :: 2081 x 3026 :: 4.18 MB</div>', 'k': '4ac8b4df7b', 'i3': '<a onclick="return load_image(28, \'08f760efab\')" href="https://exhentai.org/s/08f760efab/1768226-28"><img id="img" src="https://lwujxhaydlqtdzxawoti.hath.network/om/85966154/4ac8b4df7bdd120bf9252c854b0e9fa1a7abff85-4381135-2081-3026-png/x/0/c48z706qv12vwq8o2c/027.png" style="height:3026px;width:2081px" onerror="this.onerror=null; nl(\'nz2-445629\')" /></a>', 'i5': '<div class="sb"><a href="https://exhentai.org/g/1768226/06042fece5/"><img src="https://exhentai.org/img/b.png" referrerpolicy="no-referrer" /></a></div>', 'i6': ' &nbsp; <img src="https://exhentai.org/img/mr.gif" class="mr" /> <a href="https://exhentai.org/?f_shash=4ac8b4df7bdd120bf9252c854b0e9fa1a7abff85&amp;fs_from=027.png+from+%28SC53%29+%5BIdenshi+no+Fune%2C+Jibaku-System+%28Nanjou+Asuka%2C+Suzuki+Amaharu%29%5D+Trick+or+Treat%21%21+%2F+Kyonyuu+Shougakusei+Halloween">Show all galleries with this file</a>  &nbsp; <img src="https://exhentai.org/img/mr.gif" class="mr" /> <a href="#" id="loadfail" onclick="return nl(\'nz2-445629\')">Click here if the image fails loading</a> ', 'i7': '', 'si': 'nz2', 'x': '2081', 'y': '3026'}←[0m
(ERRO) ←[1;31mexhentai: Unable to parse image info for 'https://lwujxhaydlqtdzxawoti.hath.network/om/85966154/4ac8b4df7bdd120bf9252c854b0e9fa1a7abff85-4381135-2081-3026-png/x/0/c48z706qv12vwq8o2c/027.png'←[0m

I have tried opening the link https://lwujxhaydlqtdzxawoti.hath.network/om/85966154/4ac8b4df7bdd120bf9252c854b0e9fa1a7abff85-4381135-2081-3026-png/x/0/c48z706qv12vwq8o2c/027.png through a browser and it opens just fine, I was wondering if there was a way in the setting to make the program retry parsing since right now it just errors and moves to the next item

another example would be:

(DEBU) ←[0;37mexhentai: Page content:
{'p': 24, 's': 's/520079fd7c/1768206-24', 'n': '<div class="sn"><a onclick="return load_image(1, \'ac6443cebf\')" href="https://exhentai.org/s/ac6443cebf/1768206-1"><img src="https://exhentai.org/img/f.png" /></a><a id="prev" onclick="return load_image(23, \'1c62cf86a0\')" href="https://exhentai.org/s/1c62cf86a0/1768206-23"><img src="https://exhentai.org/img/p.png" /></a><div><span>24</span> / <span>25</span></div><a id="next" onclick="return load_image(25, \'536f12b7ec\')" href="https://exhentai.org/s/536f12b7ec/1768206-25"><img src="https://exhentai.org/img/n.png" /></a><a onclick="return load_image(25, \'536f12b7ec\')" href="https://exhentai.org/s/536f12b7ec/1768206-25"><img src="https://exhentai.org/img/l.png" /></a></div>', 'i': '<div>23.jpg :: 1304 x 1826 :: 1.65 MB</div>', 'k': '520079fd7c', 'i3': '<a onclick="return load_image(25, \'536f12b7ec\')" href="https://exhentai.org/s/536f12b7ec/1768206-25"><img id="img" src="https://lwujxhaydlqtdzxawoti.hath.network/om/80062079/520079fd7c745595e23fb3793a28c55908ecb52e-1726929-1304-1826-jpg/x/0/e70cjo3fedytv28o2n/23.jpg" style="width:1304px;height:1826px" onerror="this.onerror=null; nl(\'nz2-445629\')" /></a>', 'i5': '<div class="sb"><a href="https://exhentai.org/g/1768206/b2c69afd7f/"><img src="https://exhentai.org/img/b.png" referrerpolicy="no-referrer" /></a></div>', 'i6': ' &nbsp; <img src="https://exhentai.org/img/mr.gif" class="mr" /> <a href="https://exhentai.org/?f_shash=520079fd7c745595e23fb3793a28c55908ecb52e&amp;fs_from=23.jpg+from+%5BHisamaru+Hajime%5D+Ochime+Idol+no+Eigyou">Show all galleries with this file</a>  &nbsp; <img src="https://exhentai.org/img/mr.gif" class="mr" /> <a href="#" id="loadfail" onclick="return nl(\'nz2-445629\')">Click here if the image fails loading</a> ', 'i7': '', 'si': 'nz2', 'x': '1304', 'y': '1826'}←[0m
(ERRO) ←[1;31mexhentai: Unable to parse image info for 'https://lwujxhaydlqtdzxawoti.hath.network/om/80062079/520079fd7c745595e23fb3793a28c55908ecb52e-1726929-1304-1826-jpg/x/0/e70cjo3fedytv28o2n/23.jpg'←[0m

although this one actually seems to be an invalid request, when loading the page from the browser it loads through another hath.network url.

Furthermore even when I retry downloading it always errors out with the same error at the exact image, I have tried running --clear-cache but it didn't help.

A third item I wanted to ask (not an issue, just for clarification) is that I have seen in the config example the following:

 "exhentai":
        {
            "cookies":
            {
                "ipb_member_id": "12345",
                "ipb_pass_hash": "1234567890abcdef",
                "igneous"      : "123456789",
                "hath_perks"   : "m1.m2.m3.a-123456789a"
            },

I was wondering if there was any documentation regarding setting up the hath_perks, I tried looking but haven't found anything.

somebody1234 commented 3 years ago

that (hath_perks) is just a cookie, you have to buy the hath perks using ingame currency so i don't think that would change anything. also isn't it better and/or easier to just download the torrent for the galleries

colpocleisis commented 3 years ago

I solved this by changing Image Load Settings on the website from Default port clients only to Any client (Recommended) tho this has caused another issue where the amount of clients not replying increased considerably, at least its not failing at the same point every time and I can just run the script again.

mikf commented 3 years ago

@colpocleisis should also be fixed with https://github.com/mikf/gallery-dl/commit/9b2e5f72d6bd55cc84d65e32b061372ea0c59110

I was wondering if there was any documentation regarding setting up the hath_perks, I tried looking but haven't found anything.

These are just the cookies you can get with your browser's dev tools: https://github.com/mikf/gallery-dl#cookies