mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 23:59:56 +08:00
fix(facebook): replace facebook tracking link with original link (#7460)
This commit is contained in:
@@ -24,6 +24,13 @@ const parseStoryPage = async (linkPath, cache) => {
|
||||
const $box = $story.find('div > div > div > div').eq(0);
|
||||
const $header = $box.find('header').eq(0);
|
||||
const $content = $box.find('div > div').eq(0);
|
||||
$content.find('a[href^="https://lm.facebook.com/l.php"]').each((_, ele) => {
|
||||
const link = $(ele);
|
||||
const originalLink = new URL(link.attr('href')).searchParams.get('u');
|
||||
if (originalLink) {
|
||||
link.attr('href', decodeURIComponent(originalLink));
|
||||
}
|
||||
});
|
||||
const $attach = $story.find('div > div > div > div:nth-child(3)').eq(0);
|
||||
|
||||
const attachLinkList = $attach
|
||||
|
||||
Reference in New Issue
Block a user