Skip to content

Commit

Permalink
fix(route): PornHub pornstar pages (#15616)
Browse files Browse the repository at this point in the history
* Update pornstar.ts

Update video section selector

* Update pornstar.ts

Fix pornstar URL - it is different to how models URL structured
  • Loading branch information
Antesam authored May 17, 2024
1 parent 5798b31 commit 3a4d8db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/pornhub/pornstar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ export const route: Route = {

async function handler(ctx) {
const { language = 'www', username, sort = 'mr' } = ctx.req.param();
const link = `https://${language}.pornhub.com/pornstar/${username}/videos?o=${sort}`;
const link = `https://${language}.pornhub.com/pornstar/${username}?o=${sort}`;
if (!isValidHost(language)) {
throw new InvalidParameterError('Invalid language');
}

const { data: response } = await got(link, { headers });
const $ = load(response);
const items = $('#mostRecentVideosSection .videoBox')
const items = $('#pornstarsVideoSection .videoBox')
.toArray()
.map((e) => parseItems($(e)));

Expand Down

0 comments on commit 3a4d8db

Please sign in to comment.