mirror of https://github.com/aruppi/aruppi-api
Fixes images of news
This commit is contained in:
parent
0c71bfda9a
commit
f01535e187
|
@ -1,4 +1,4 @@
|
|||
# **Aruppi API** (v2.6.5)
|
||||
# **Aruppi API** (v2.6.6)
|
||||
|
||||
> This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture
|
||||
>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "aruppi",
|
||||
"version": "2.6.5",
|
||||
"version": "2.6.6",
|
||||
"description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app",
|
||||
"main": "./src/api/api.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -535,7 +535,9 @@ const obtainPreviewNews = (encoded) => {
|
|||
|
||||
let image;
|
||||
|
||||
if (encoded.includes('<img title=')) {
|
||||
if (encoded.includes('src="https://img1.ak.crunchyroll.com/')) {
|
||||
image = `https://img1.ak.crunchyroll.com/${encoded.split('https://img1.ak.crunchyroll.com/')[1].split('.jpg')[0]}.jpg`
|
||||
} else if (encoded.includes('<img title=')) {
|
||||
image = encoded.substring(encoded.indexOf("<img title=\""), encoded.indexOf("\" alt")).split('src=\"')[1]
|
||||
} else if (encoded.includes('<img src=')) {
|
||||
image = encoded
|
||||
|
|
Loading…
Reference in New Issue