fix: Fix the Dribbble urls so that they always work properly, e… (#3580)

This commit is contained in:
Logan Rockmore 2019-12-13 01:20:32 -07:00 committed by DIYgod
parent 5c70eb95f8
commit 4ee95d9dcf
1 changed files with 5 additions and 5 deletions

View File

@ -31,11 +31,11 @@ async function ProcessFeed(list, caches) {
list.map(async (item) => {
const $ = cheerio.load(item);
const itemUrlPath =
$('.animated-target').attr('href') ||
$('.extras > a')
.attr('href')
.replace('/rebounds', '');
// the rebounds link is used because all other links in the html could
// possibly point to /signup/new when loading the site while not logged in.
const itemUrlPath = $('.extras > a')
.attr('href')
.replace('/rebounds', '');
const itemUrl = url.resolve(host, itemUrlPath);
const team = $('.attribution-team').text() ? ' for ' + $('.attribution-team a.url').text() : '';