Skip to content

Commit

Permalink
fix: load taggroup
Browse files Browse the repository at this point in the history
  • Loading branch information
OpportunityLiu committed Sep 15, 2023
1 parent b395851 commit 91c9a93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/ehentai/get-tag-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import { type MasterTag, store } from './tag.js';
export async function getTagGroups(): Promise<MasterTag[]> {
const tags = [];
for (let i = 0; i <= 11; i++) {
const response = (await get<string>(`https://repo.e-hentai.org/tools.php?act=taggroup&show=${i}`)).data;
const response = (await get<string>(`https://repo.e-hentai.org/tools/taggroup?show=${i}`)).data;
const namespace = /\[<span style="font-weight:bold">(\w+)<\/span>\]/.exec(response)?.[1];
if (!isNamespaceName(namespace)) {
continue;
}
const matches = response.matchAll(
/<a href="https:\/\/repo\.e-hentai\.org\/tools\.php\?act=taggroup&amp;mastertag=(\d+)">(\w+):([-. \w]+)<\/a>/g,
/<a href="https:\/\/repo\.e-hentai\.org\/tools\/taggroup?mastertag=(\d+)">(\w+):([-. \w]+)<\/a>/g,
);
for (const match of matches) {
const id = Number.parseInt(match[1]);
Expand Down

0 comments on commit 91c9a93

Please sign in to comment.