AtoraSuunva / booru

Searches boorus for images using some js magic
https://www.npmjs.com/package/booru
MIT License
79 stars 19 forks source link

domain `xbooru.com` returns wrong image urls #107

Closed iced-queen closed 1 month ago

iced-queen commented 1 month ago

The domain xbooru.com returns wrong image urls

As an example, the post: https://xbooru.com/index.php?page=post&s=view&id=1096776 Which has its image url being: https://xbooru.com//samples/609/sample_e093798d1ceb994a1c73c12f980618fb.jpg?1096776

Will return image urls like:

preview_url: 'https://api-cdn.rule34.xxx/thumbnails/609/thumbnail_e093798d1ceb994a1c73c12f980618fb.jpg',
sample_url: 'https://api-cdn.rule34.xxx/samples/609/sample_e093798d1ceb994a1c73c12f980618fb.jpg',
file_url: 'https://api-cdn.rule34.xxx/images/609/e093798d1ceb994a1c73c12f980618fb.jpeg',

These urls will take you to the 404 page, making the xbooru.com site for this library unusable.

AtoraSuunva commented 1 month ago

xbooru's API is the one returning api-cdn.rule34.xxx file urls for some reason, I added a (hacky?) fix to replace the domain from the API with xbooru.com in https://github.com/AtoraSuunva/booru/releases/tag/v2.6.8