mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-14 18:17:23 +09:00
parent
e3fff6efe2
commit
7cfb711167
@ -9,12 +9,14 @@ import { AllHtmlEntities } from 'html-entities';
|
||||
const entities = new AllHtmlEntities();
|
||||
|
||||
import * as client from 'cheerio-httpcli';
|
||||
|
||||
// 単一インスタンスなのでamazonと値を揃えないといけない
|
||||
client.set('headers', {
|
||||
'User-Agent': `${name}/${version}`
|
||||
'User-Agent': `SummalyBot/${version}`
|
||||
});
|
||||
client.set('referer', false);
|
||||
client.set('timeout', 10000);
|
||||
client.set('maxDataSize', 5 * 1024 * 1024);
|
||||
client.set('maxDataSize', 10 * 1024 * 1024);
|
||||
|
||||
import Summary from './summary';
|
||||
|
||||
|
@ -4,11 +4,11 @@ import * as client from 'cheerio-httpcli';
|
||||
import summary from '../summary';
|
||||
|
||||
client.set('headers', {
|
||||
'User-Agent': `${name}/${version}`
|
||||
'User-Agent': `SummalyBot/${version}`
|
||||
});
|
||||
client.set('referer', false);
|
||||
client.set('timeout', 10000);
|
||||
client.set('maxDataSize', 5 * 1024 * 1024);
|
||||
client.set('maxDataSize', 10 * 1024 * 1024);
|
||||
|
||||
export function test(url: URL.Url): boolean {
|
||||
return url.hostname === 'www.amazon.com' ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user