beer-psi / fakk-u-downloader

script to download manga from fakku.net
5 stars 1 forks source link

Not working anymore #3

Closed pandafeliz closed 2 months ago

pandafeliz commented 2 months ago

Long shot but getting this since yesterday, the strange thing is it still works for all the previous mangas before this one: X-Eros Girls Collection #113: Senoo Hibiterum, anything after throws the same error.

@HOME G:\apps\fakk-u-downloader
$ main.py --nozip --nometa
Pingo not found, disabling optimization
https://www.fakku.net/hentai/x-eros-girls-collection-113-senoo-hibiteru-english
Downloading "x-eros-girls-collection-113-senoo-hibiteru-english" manga.
Traceback (most recent call last):
  File "G:\apps\fakk-u-downloader\main.py", line 200, in <module>
    main()
  File "G:\apps\fakk-u-downloader\main.py", line 196, in main
    loader.load_all()
  File "G:\apps\fakk-u-downloader\descramble_downloader.py", line 465, in load_all
    future.result()
  File "C:\Python311\Lib\concurrent\futures\_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\concurrent\futures\_base.py", line 401, in __get_result
    raise self._exception
  File "C:\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\apps\fakk-u-downloader\descramble_downloader.py", line 441, in worker
    raw, image, lmt, ext = self._download_page(image_url, keys.get(idx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\apps\fakk-u-downloader\descramble_downloader.py", line 271, in _download_page
    lmt = parse(resp.headers["Last-Modified"]).astimezone().timestamp()
                ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\requests\structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
           ~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'last-modified'
beer-psi commented 2 months ago

I quit using the service a long while back. It's likely they updated the obfuscation, but I can't reverse engineer without an account.

Senn211 commented 2 months ago

That sucks. This has been a great tool for over year for me. Thanks for making it. I can tell you that the issue stems from when the descrambled_downloader script tries to get a page to download, the page gets redirected with a response 302 to the home page.

pandafeliz commented 2 months ago

I quit using the service a long while back. It's likely they updated the obfuscation, but I can't reverse engineer without an account.

is there a way to contact you privately?

beer-psi commented 2 months ago

My email and Discord are listed on my profile page at the bottom.

pandafeliz commented 2 months ago

My email and Discord are listed on my profile page at the bottom.

got it

beer-psi commented 2 months ago

Fixed. It turns out the core descrambling algorithm didn't change at all, FAKKU just removed Content-Type and Last-Modified headers from image requests. I've updated the hardcoded user agent and some request headers just in case.

Tested on fairly recent entries, but if something breaks please reopen the issue.