Skip to content

[bug] Image extension wrong for some thumbnails and covers #16

@ApexLiberta

Description

@ApexLiberta
  • Engine: [ex. Nodejs v12]
  • I am using the latest version of this library (4.0.0)

Description
some images have mismatch extesnions

Code

in nhentai.net

<a href="/g/568442/1/">
  <img class="lazyload" width="350" height="487" data-src="//t4.nhentai.net/galleries/3317083/cover.jpg.webp" src="//t9.nhentai.net/galleries/3317083/cover.jpg.webp">
  <noscript><img src="//t4.nhentai.net/galleries/3317083/cover.jpg.webp" width="350" height="487"  /></noscript>
</a>
nlm.nhFetcher(568442).then((data) => {
	console.log("test", data);
});
// response 
{
    "raw": {
        "images": {
            "cover": {
                "t": "w",
                "w": 350,
                "h": 487
            },
            "thumbnail": {
                "t": "w",
                "w": 250,
                "h": 348
            }
        }
    },
    "id": 568442,
    "mediaId": 3317083,
    "titles": {
        "english": "[Joucho] Gal to Otaku no Idenshi Aishou Batsugun H",
        "japanese": "[情緒] ギャルとオタクの遺伝子相性抜群H",
        "pretty": "Gal to Otaku no Idenshi Aishou Batsugun H"
    },
    "url": "https://nhentai.net/g/568442",
    "cover": {
        "pageNumber": null,
        "extension": "webp",
        "height": 487,
        "width": 350,
        "url": "https://t.nhentai.net/galleries/3317083/cover.webp"
    },
    "thumbnail": {
        "pageNumber": null,
        "extension": "webp",
        "height": 348,
        "width": 250,
        "url": "https://t.nhentai.net/galleries/3317083/thumb.webp"
    }
}

Expected vs. Current behavior

https://t4.nhentai.net/galleries/3317083/cover.jpg.webp

should be the thumbnail or cover img link but in nhentai package it is

https://t.nhentai.net/galleries/3317083/thumb.webp

exapmle code 568442

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions