mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-28 17:07:16 +09:00
Fix bug
This commit is contained in:
parent
6f5cd3a032
commit
d20f503b17
@ -13,7 +13,7 @@ export function test(url: URL.Url): boolean {
|
||||
export async function summarize(url: URL.Url): Promise<summary> {
|
||||
const lang = url.host.split('.')[0];
|
||||
const title = url.pathname.split('/')[2];
|
||||
const endpoint = `https://${lang}.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=${encodeURIComponent(title)}`;
|
||||
const endpoint = `https://${lang}.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=${title}`;
|
||||
|
||||
log(`lang is ${lang}`);
|
||||
log(`title is ${title}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user