Fix zhihu and dribbble guid conflict (#1428)
问题路由: ``` /zhihu/collection/26444956 /dribbble/user/google /dribbble/keyword/player ```
This commit is contained in:
parent
7b85955fe2
commit
55ce3bdb1e
|
|
@ -36,7 +36,11 @@ module.exports = {
|
|||
<strong>Views:</strong> ${item.find('.views').text()}<br>
|
||||
<strong>Comment:</strong> ${item.find('.cmnt').text()}<br>
|
||||
<strong>Favor:</strong> ${item.find('.fav').text()}`,
|
||||
link: `https://dribbble.com${item.find('.dribbble-link').attr('href')}`,
|
||||
link: `https://dribbble.com${item.find('.animated-target').attr('href') ||
|
||||
item
|
||||
.find('.extras > a')
|
||||
.attr('href')
|
||||
.replace('/rebounds', '')}`,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ module.exports = async (ctx) => {
|
|||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
let linkUrl = item.find('link').attr('href') || '';
|
||||
let linkUrl = item
|
||||
.find('a.meta-item')
|
||||
.not('a.toggle-comment')
|
||||
.attr('href');
|
||||
if (linkUrl.startsWith('/')) {
|
||||
linkUrl = 'https://www.zhihu.com' + linkUrl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue