Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error code: No filename extension found for MIME type [ehentai] #632

Closed
GuerrillaGun opened this issue Mar 3, 2020 · 6 comments
Closed

Comments

@GuerrillaGun
Copy link

Having issues with ehentai, it's downloaded just fine for months. Im receiving the error code in the subject and gallery-dl only seems to dl text files instead of the necessary jpg or png files. Other sites are unaffected. Ive updated the application and dependencies as instructed on the homepage to no avail. Im guessing ehentai changed something and broke compatibility. If anyone could confirm that ehentai isnt working for them Id appreciate it.
Ubuntu 18.04, gallery-dl 1.13.1

@ghost
Copy link

ghost commented Mar 3, 2020

Yes I'm getting the same thing:

$ gallery-dl -v https://exhentai.org/g/1528892/6ce4a2651a/
gallery-dl: Version 1.13.1
gallery-dl: Python 3.7.6 - Linux-5.4.0-4-amd64-x86_64-with-debian-bullseye-sid
gallery-dl: requests 2.22.0 - urllib3 1.25.8
gallery-dl: Starting DownloadJob for 'https://exhentai.org/g/1528892/6ce4a2651a/'
exhentai: Using ExhentaiGalleryExtractor for 'https://exhentai.org/g/1528892/6ce4a2651a/'
urllib3.connectionpool: Starting new HTTPS connection (1): exhentai.org:443
urllib3.connectionpool: https://exhentai.org:443 "GET /g/1528892/6ce4a2651a/ HTTP/1.1" 200 7550
urllib3.connectionpool: https://exhentai.org:443 "GET /s/08cdbecc0c/1528892-1/1528892-1 HTTP/1.1" 200 1387
exhentai: Active postprocessor modules: [MetadataPP]
urllib3.connectionpool: Starting new HTTPS connection (1): e-hentai.org:443
urllib3.connectionpool: https://e-hentai.org:443 "GET /home.php HTTP/1.1" 200 2368
exhentai: Image Limits: 161/5000
urllib3.connectionpool: https://exhentai.org:443 "GET /fullimg.php?gid=1528892&page=1&key=jj78g6n9fc5 HTTP/1.1" 302 3
urllib3.connectionpool: Starting new HTTPS connection (1): thzaexqketdoxorsmqpe.hath.network:443
urllib3.connectionpool: https://thzaexqketdoxorsmqpe.hath.network:443 "GET /om/75358783/08cdbecc0c3b1090a1cf16682b1bfd84738fab17-1298115-1389-1965-jpg/x/0/3p36u7pqhdrxoq15bx/001.jpg?dl=1 HTTP/1.1" 200 1298115
downloader.http: No filename extension found for MIME type 'jpg'
./exhentai/[Irotenya]_Shippai!_Otori_Sousa_|_Fa…!_Investigation_Bait_[English]_[defski]/1_001.txt

@mehstar
Copy link

mehstar commented Mar 3, 2020

Ditto.

Strangely, about 1 in 10 of the files in a gallery will have the correct extension. All others are .txt, but the files are fine after renaming them with the correct extension.

mikf added a commit that referenced this issue Mar 4, 2020
e-/exhentai's original image downloads currently send
incomplete/invalid Content-Type headers, "jpg" instead
of "image/jpg" etc, since the last update.
(https://forums.e-hentai.org/index.php?showtopic=236113)

This change prepends any Content-Type value missing a
media type specification with "image/", transforming it
into a valid MIME type.

(A global solution to a local problem, but it shouldn't
 cause any issues anywhere else)
@mikf
Copy link
Owner

mikf commented Mar 4, 2020

Since the last update, Content-Type headers for original image downloads are incomplete
(for example jpg instead of image/jpg) and gallery-dl as wel as Python's mimetypes module are unable to find a filename extension for those, hence the warning and a (rather useless) .txt.

115fd2c fixes this for gallery-dl, but I wouldn't be surprised if this will also get fixed on e-/exhentai's servers themselves in due time.

@GuerrillaGun
Copy link
Author

Thanks for the quick fix @mikf, works a charm.

@mehstar
Copy link

mehstar commented Mar 4, 2020

Works for me too! Thanks mikf!

@Linda-chan
Copy link

Linda-chan commented Mar 9, 2020

Version 1.13.1, Windows 7. Still get .txt files =_=

Ah... Dev version. Ok,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants