mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-03 12:47:31 +09:00
enhance: accept XHTML (#149)
This commit is contained in:
parent
1f01f12ace
commit
d55bcab8e6
@ -15,11 +15,11 @@ export async function scpaping(url: string, opts?: { lang?: string; }) {
|
|||||||
url,
|
url,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'accept': 'text/html',
|
'accept': 'text/html,application/xhtml+xml',
|
||||||
'user-agent': BOT_UA,
|
'user-agent': BOT_UA,
|
||||||
'accept-language': opts?.lang
|
'accept-language': opts?.lang
|
||||||
},
|
},
|
||||||
typeFilter: /^text\/html/,
|
typeFilter: /^(text\/html|application\/xhtml\+xml)/,
|
||||||
});
|
});
|
||||||
|
|
||||||
// テスト用
|
// テスト用
|
||||||
|
Loading…
x
Reference in New Issue
Block a user