Skip to content

Commit c92aa87

Browse files
committed
Add the page loader
1 parent a97d7b9 commit c92aa87

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/page-loaders.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,13 @@ export const loadChaptersIndexPage = async ({ workId }: { workId: string }) => {
9090
).data
9191
) as ChapterIndexPage;
9292
};
93+
94+
export interface SeriesPage extends CheerioAPI {
95+
kind: "SeriesPage";
96+
}
97+
export const loadSeriesPage = async (seriesId: string) => {
98+
return load(
99+
(await axios.get<string>(`https://archiveofourown.org/series/${seriesId}`))
100+
.data
101+
) as SeriesPage;
102+
};

0 commit comments

Comments
 (0)