You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
JavaScript
30 lines
1.2 KiB
JavaScript
export const maskScrapingHeaders = {
|
|
'User-Agent':
|
|
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
|
|
Accept:
|
|
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
|
'Accept-Language': 'es-ES,es;q=0.9,en;q=0.8',
|
|
'Accept-Encoding': 'gzip, deflate, br',
|
|
Connection: 'keep-alive',
|
|
'Upgrade-Insecure-Requests': '1',
|
|
'Cache-Control': 'max-age=0',
|
|
};
|
|
|
|
const url = 'https://monoschinos2.com';
|
|
|
|
export const api = {
|
|
home: `${url}`,
|
|
all: (id) => `${url}/animes?p=${id}`,
|
|
emision: (id) => `${url}/emision?p=${id}`,
|
|
calendar: `${url}/calendario`,
|
|
search: (id, page) => `${url}/buscar?q=${id.replace(/\s/g, '+')}&p=${page}`,
|
|
anime: (id) => `${url}/anime/${id}`,
|
|
episode: (id) => `${url}/ver/${id}`,
|
|
gender: (id) => `${url}/genero/${id}`,
|
|
filter: ({ categoria, fecha, genero, letra, pagina }) =>
|
|
`${url}/animes?categoria=${categoria}&genero=${genero}&fecha=${fecha}&letra=${letra}&p=${pagina}`,
|
|
};
|
|
export function attr(html, selector, attribute = 'src') {
|
|
return html.querySelector(selector)?.attributes[attribute];
|
|
}
|