Sn0wCrack / ExHen-Archive

System for crawling/archiving and viewing ExHen galleries
The Unlicense
88 stars 8 forks source link

Seemingly not working with new download options change #3

Closed Sunako closed 8 years ago

Sunako commented 8 years ago

As I referenced here https://github.com/Sn0wCrack/ExHentai-Archive/commit/f7a8369d8f6475656d3c6f74ec51f1e51aeff2f9#commitcomment-18600279 I'm having trouble getting downloads to work with the recent download options change at exh.

I get this when I try to archive something: ERROR: [2016-08-11 03:04:25][ExArchiver] Downloaded file is not an archive for gallery:

The file itself is just the page HTML with stuff like: The file was successfully prepared, and is ready for download.

I'm using php7 on the machine, if that matters.

I did just setup this instance to test it so it isn't impossible I've done something wrong, however I'm a user of the original one from kimoi(okawus) so I have done it before.

Sn0wCrack commented 8 years ago

I'll just need a little bit more info from you:

PHP 7 wouldn't be the issue as I'm currently running 7.0.9 and it runs fine.

I've made up a custom ExArchiver.php to save a exarchiver.log file in the same directory as TaskRunner.php, after running TaskRunner can you also upload the exarchiver.log.

The custom ExArchiver.php is here: https://gist.github.com/Sn0wCrack/b0e7c3090e20104a291e00ff39f25dfd

Just replace your ExArchiver.php (located in classes directory) with this one.

Sunako commented 8 years ago

And this is the exarchiver.log https://fuyu.me/txt/exarchiver.txt (I just picked a random gallery to test on)

For the hell of it here is the entire process after php TaskRunner.php Archive:

DEBUG: [2016-08-11 09:55:54][TaskRunner] Running task Task_Archive DEBUG: [2016-08-11 09:55:54][ExArchiver] Archiving gallery: #964004 DEBUG: [2016-08-11 09:55:55][ExArchiver] Downloading gallery archive ERROR: [2016-08-11 09:55:56][ExArchiver] Downloaded file is not an archive for gallery: Title goes here lol (#964004) DEBUG: [2016-08-11 09:55:56][ExArchiver] Archive complete. Archived 0 galleries. DEBUG: [2016-08-11 09:55:56][TaskRunner] Finished running task Task_Archive

Edit: Just noticed your config.json edit. I am using the supplied one from you with the only changes being adding in my own id and hash as well as mysql pass. Here it is anyway though https://fuyu.me/txt/exh_config.txt

Sn0wCrack commented 8 years ago

Ah yeah, I see the issue now. It's based on the "Achiever settings" in the ExHentai settings, it should be set to default, being Manual Select, Manual Start, and your cookie new uconfig cookie should be placed in to config.json.

However, I can get the Archive download for the Gallery out of it, so I'll update it to work with pretty much all configs.

Sunako commented 8 years ago

Oh yeah mine is set to the default one Manual Select, Manual Start (Default)

Sn0wCrack commented 8 years ago

Oh, well, I'll update it none the less to fix this issue from occurring with anyone else.

Sunako commented 8 years ago

Yeah it does work if I copy my uconfig cookie data into the config. I kinda derped and forgot that I needed to change that part. My bad lol.

Sn0wCrack commented 8 years ago

Either way I've added the functionality for it to work under this situation.

Glad to hear it's working however.

Sunako commented 8 years ago

@Sn0wCrack Unrelated but does /js/exhen.js need the config.json file to be in the www folder? Because it is having clients request it and the original project I'm still using didn't require it. 2016/08/11 10:43:01 [error] 24890#24890: *388 open() "/blah/blah/www/config.json" failed (2: No such file or directory)

Sn0wCrack commented 8 years ago

config.json is required to be in the same directory as your api.php and TaskRunner.php, should probably put something about that somewhere, always slips my mind.

And I'm running the current 2.2.11 version of sphinx that's located here: http://sphinxsearch.com/downloads/release/

Make sure you've created the directories referred to in sphinx.conf, being /var/lib/sphinxsearch/data/exhen/galleries and /var/lib/sphinxsearch/data/exhen/suggested and updated the mysql connection info in sphinx.conf After that make your indexes with sudo indexer --rotate --all

Sunako commented 8 years ago

Yeah I got sphinx 2.2.9 working after all. For some reason sphinx is always just an annoyance to get working right.

Also api.php is in the www folder while TaskRunner.php is in the root of the project folder and config.json is in the project root by default as well.

Double also, not sure if you care but I'm going to fork and edit the linux guide to be more modern (nginx php7 mariadb etcetc) at some point. If you want me to PR it back to this repo let me know.

Sn0wCrack commented 8 years ago

It'd be great if you've do a PR for a guide update, I'm not really an intense Linux user, so it'd be a help.

But yeah, config.json needs to be in both, I might just make a copy in the www directory and mention it in the guides, or tell people to copy it into the www directory.

Sunako commented 8 years ago

Sure no problem, I'm mostly a linux guy myself and I want to just update the guide for my own notes so I remember how to install this whole thing lol.

And okay, I'll copy it over. Thanks for all the help.

P.S. Do you by any chance use IRC? Like on Rizon maybe? If so you should visit the #madokami channel sometime. It is the manga downloading secret club if you haven't been to it yet. I have the same name on IRC as here(Sunako).

Sn0wCrack commented 8 years ago

Don't usually use IRC, but I'll pop in at some point.