Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
5.5.0 / 2026/xx/xx
------------------

* デフォルトの User Agent に、summaly の readme へのリンクを含めるようにしました。
* 現在お使いの summaly のバージョンを export するように

5.4.0 / 2026/05/11
------------------
* テキストのデコードに `TextDecoder` を使用するように
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ summaly
[![][himawari-badge]][himasaku]
[![][sakurako-badge]][himasaku]

Get summary of web page.

Installation
----------------------------------------------------------------
```
Expand Down Expand Up @@ -49,7 +51,7 @@ npm run serve
| **followRedirects** | *boolean* | Whether follow redirects | `true` |
| **plugins** | *plugin[]* (see below) | Custom plugins | `null` |
| **agent** | *Got.Agents* | Custom HTTP agent (see below) | `null` |
| **userAgent** | *string* | User-Agent for the request | `SummalyBot/[version]` |
| **userAgent** | *string* | User-Agent for the request | `SummalyBot/[version] (+[Link to README file in GitHub])` |
| **responseTimeout** | *number* | Set timeouts for each phase, such as host name resolution and socket communication. | `20000` |
| **operationTimeout** | *number* | Set the timeout from the start to the end of the request. | `60000` |
| **contentLengthLimit** | *number* | If set to true, an error will occur if the content-length value returned from the other server is larger than this parameter (or if the received body size exceeds this parameter). | `10485760` |
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export const summalyDefaultOptions = {
plugins: [],
} as SummalyOptions;

export const version = _VERSION_;

/**
* Summarize an web page
*/
Expand Down
2 changes: 1 addition & 1 deletion src/utils/got.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type GotOptions = {
export const DEFAULT_RESPONSE_TIMEOUT = 20 * 1000;
export const DEFAULT_OPERATION_TIMEOUT = 60 * 1000;
export const DEFAULT_MAX_RESPONSE_SIZE = 10 * 1024 * 1024;
export const DEFAULT_BOT_UA = `SummalyBot/${_VERSION_}`;
export const DEFAULT_BOT_UA = `SummalyBot/${_VERSION_} (+https://github.com/misskey-dev/summaly/blob/master/README.md)`;

export function getGotOptions(url: string, opts?: GeneralScrapingOptions): Omit<GotOptions, 'method'> {
return {
Expand Down
Loading