dmhy-get-api-unofficial
v1.0.0
Published
Yet another DMHY scraper
Downloads
5
Readme
dmhy-get-api-unofficial
Yet another DMHY scraper
Quick Start
npm install dmhy-get-api-unofficial
Use the express app or router
import { dmhyRouter } from "dmhy-get-api-unofficial" // router
import { app as yourApp } from "dmhy-get-api-unofficial" // express app instance
Use the scraper
import { scrapeDMHYList } from "dmhy-get-api-unofficial"
interface DMHYSearchQuery {
keyword?: string | number;
sort_id?: string | number;
team_id?: string | number;
user_id?: string | number;
order?: 'date-desc' | 'date-asc' | 'rel';
page?: string | number;
}
async function scrapeDMHYList(
queries: DMHYSearchQuery = {},
options: Record<string, unknown> = {},
): Promise<string> // return the html text
Use the parser
import { parseDMHYList, parseDMHYSearchOptions } from "dmhy-get-api-unofficial"
- parseDMHYSearchOptions(): returns directly the advanced search options (see swagger).
- parseDMHYList(html: string): returns info scraping from list view (see swagger).