Skip to content

Commit

Permalink
sources: fix pagination on E-H (fix #2880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Mar 1, 2023
1 parent 1f7b179 commit 31a40b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sites/E-Hentai/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ export const source: ISource = {
auth: [],
forcedLimit: 25,
search: {
url: (query: ISearchQuery): string => {
url: (query: ISearchQuery, opts: IUrlOptions, previous: IPreviousSearch | undefined): string => {
const s = parseSearch(query.search);
return "/?page=" + (query.page - 1) + "&f_cats=" + s.cats + "&f_search=" + encodeURIComponent(s.search);
const pagePart = Grabber.pageUrl(query.page, previous, 1, "", "prev={max}", "next={min}");
return "/?" + pagePart + "&f_cats=" + s.cats + "&f_search=" + encodeURIComponent(s.search);
},
parse: (src: string): IParsedSearch | IError => {
const html = Grabber.parseHTML(src);
Expand Down

0 comments on commit 31a40b3

Please sign in to comment.