enhance: accept XHTML (#149)

This commit is contained in:
Johann150 2022-07-09 02:31:04 +02:00 committed by GitHub
parent 1f01f12ace
commit d55bcab8e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,11 +15,11 @@ export async function scpaping(url: string, opts?: { lang?: string; }) {
url,
method: 'GET',
headers: {
'accept': 'text/html',
'accept': 'text/html,application/xhtml+xml',
'user-agent': BOT_UA,
'accept-language': opts?.lang
},
typeFilter: /^text\/html/,
typeFilter: /^(text\/html|application\/xhtml\+xml)/,
});
// テスト用