@untidy/animeflv
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -17,3 +17,3 @@ export interface TitleMobile { | ||
} | ||
export interface InformationMobile extends Omit<Title, 'slug' | 'type'> { | ||
export interface InformationMobile extends Omit<Title, 'slug'> { | ||
status: string; | ||
@@ -28,3 +28,3 @@ genres: string[]; | ||
/** | ||
* @description Retrieves the information of the title/anime for the path "anime" on the desktop site. | ||
* @description Retrieves the information of the title/anime for the path `/anime/:title` on the desktop site. | ||
* @param html - Plain html text. | ||
@@ -35,5 +35,5 @@ * @returns Returns an object containing the following properties: `title`, `alternativeTitles`, `related`, `cover`, `genres`, `type`, `status`, `description` and `episodes`. | ||
/** | ||
* @description Retrieves the information of the title/anime for the path "anime" on the mobile site. | ||
* @description Retrieves the information of the title/anime for the path `/anime/:title` on the mobile site. | ||
* @param html - Plain html text. | ||
* @returns Returns an object containing the following properties: `title`, `cover`, `genres`, `status`, `description` and `episodes`. | ||
* @returns Returns an object containing the following properties: `title`, `type`, `cover`, `genres`, `status`, `description` and `episodes`. | ||
*/ | ||
@@ -40,0 +40,0 @@ export declare function getInformationMobile(html: string): InformationMobile; |
import { load } from 'cheerio'; | ||
/** | ||
* @description Retrieves the information of the title/anime for the path "anime" on the desktop site. | ||
* @description Retrieves the information of the title/anime for the path `/anime/:title` on the desktop site. | ||
* @param html - Plain html text. | ||
@@ -52,5 +52,5 @@ * @returns Returns an object containing the following properties: `title`, `alternativeTitles`, `related`, `cover`, `genres`, `type`, `status`, `description` and `episodes`. | ||
/** | ||
* @description Retrieves the information of the title/anime for the path "anime" on the mobile site. | ||
* @description Retrieves the information of the title/anime for the path `/anime/:title` on the mobile site. | ||
* @param html - Plain html text. | ||
* @returns Returns an object containing the following properties: `title`, `cover`, `genres`, `status`, `description` and `episodes`. | ||
* @returns Returns an object containing the following properties: `title`, `type`, `cover`, `genres`, `status`, `description` and `episodes`. | ||
*/ | ||
@@ -65,2 +65,3 @@ export function getInformationMobile(html) { | ||
const cover = cheerioInstance('.Anime img').attr('src') ?? ''; | ||
const type = cheerioInstance('.Image span:eq(0)').text(); | ||
cheerioInstance('.Tag').each((_i, node) => { | ||
@@ -74,3 +75,3 @@ const genre = cheerioInstance(node).text(); | ||
}); | ||
return { title, description, status, cover, genres, episodes }; | ||
return { title, description, status, type, cover, genres, episodes }; | ||
} | ||
@@ -77,0 +78,0 @@ /** |
@@ -21,3 +21,15 @@ export type GenreKeys = 'accion' | 'artes-marciales' | 'aventura' | 'carreras' | 'ciencia-ficcion' | 'comedia' | 'demencia' | 'demonios' | 'deportes' | 'drama' | 'ecchi' | 'escolares' | 'espacial' | 'fantasia' | 'harem' | 'historico' | 'infantil' | 'josei' | 'juegos' | 'magia' | 'mecha' | 'militar' | 'misterio' | 'musica' | 'parodia' | 'policia' | 'psicologico' | 'recuentos-de-la-vida' | 'romance' | 'samurai' | 'seinen' | 'shoujo' | 'shounen' | 'sobrenatural' | 'superpoderes' | 'suspenso' | 'terror' | 'vampiros' | 'yaoi' | 'yuri'; | ||
type?: TypeKeys | TypeKeys[]; | ||
/** | ||
* - 1 = En emisión | ||
* - 2 = Finalizado | ||
* - 3 = Próximamente | ||
*/ | ||
status?: StatusKeys | StatusKeys[]; | ||
/** | ||
* - default = Por Defecto | ||
* - updated = Recientemente Actualizados | ||
* - added = Recientemente Agregados | ||
* - title = Nombre A-Z | ||
* - rating = Calificación | ||
*/ | ||
order?: OrderKeys; | ||
@@ -24,0 +36,0 @@ page?: string; |
{ | ||
"name": "@untidy/animeflv", | ||
"description": "web scraping tools for animeflv site", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
@@ -24,5 +22,3 @@ ".": { | ||
"files": [ | ||
"dist", | ||
"LICENSE", | ||
"README.md" | ||
"dist" | ||
], | ||
@@ -35,3 +31,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/node": "^20.4.2", | ||
"@types/node": "^20.4.8", | ||
"cheerio": "1.0.0-rc.12", | ||
@@ -61,3 +57,3 @@ "tsx": "^3.12.7", | ||
}, | ||
"homepage": "https://github.com/falsepopsky/lain/blob/main/packages/animeflv/README.md", | ||
"homepage": "https://lain-packages.netlify.app/animeflv/", | ||
"scripts": { | ||
@@ -64,0 +60,0 @@ "dev": "tsx ./src/playground.ts", |
@@ -15,4 +15,4 @@ # @untidy/animeflv | ||
- Built with TypeScript for full typing support | ||
- ESM only | ||
- Built with TypeScript for full typing support. | ||
- ESM only. | ||
- Uses `cheerio` to retrieve data for paths `browse`, `anime`, `ver` (for both mobile and desktop | ||
@@ -46,3 +46,4 @@ sites). | ||
`@untidy/animeflv` is easy to use, The following example demonstrates how to retrieve the URL for | ||
recently updated movies in the year 2023. | ||
recently updated movies in the year 2023. For more examples with other APIs, please refer to the | ||
[Docs](#page_facing_up-docs) section. | ||
@@ -68,7 +69,5 @@ Example usage: | ||
For more examples with other APIs, please refer to the "Docs" section. | ||
## :page_facing_up: Docs | ||
Under construction 🚧 | ||
[API](https://lain-packages.netlify.app/animeflv/) | ||
@@ -75,0 +74,0 @@ ## :scroll: License |
28437
326
9
76