Skip to content

Commit

Permalink
Merge pull request #190 from himanshu8443/main
Browse files Browse the repository at this point in the history
Update selector for blog posts in getPosts.ts
  • Loading branch information
Zenda-Cross authored Jan 3, 2025
2 parents 70d8be6 + a49b446 commit 6d17ff5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/providers/vega/getPosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@ async function posts(
});
const $ = cheerio.load(urlRes.data);
const posts: Post[] = [];
$('.blog-items,.post-link')
$('.blog-items,.post-list')
?.children('article')
?.each((index, element) => {
const post = {
title:
$(element)
?.find('a img')
?.find('a')
?.attr('title')
?.replace('Download', '')
?.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/)?.[0] ||
$(element)?.find('a')?.attr('title')?.replace('Download', '') ||
$(element)?.find('.post-title').text()?.replace('Download', '') ||
'',

link: $(element)?.find('a')?.attr('href') || '',
Expand Down

0 comments on commit 6d17ff5

Please sign in to comment.