From f19aaa43c15808e612ea77fe22667514cb53a2db Mon Sep 17 00:00:00 2001 From: zhong666 Date: Sun, 15 Nov 2020 21:51:55 +0800 Subject: [PATCH] fix: facebook page attach cover image (#6175) --- lib/routes/facebook/page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/facebook/page.js b/lib/routes/facebook/page.js index 57db89868c..b865228e72 100644 --- a/lib/routes/facebook/page.js +++ b/lib/routes/facebook/page.js @@ -20,11 +20,11 @@ const parseStoryPage = async (linkPath, cache) => { const $ = cheerio.load(html); const url = `https://www.facebook.com/story.php?story_fbid=${storyFbId}&id=${storyId}`; - const $story = $('#m_story_permalink_view').first(); + const $story = $('#m_story_permalink_view').eq(0); 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); - const $attach = $box.find('div > div').eq(1); + const $attach = $story.find('div > div > div > div:nth-child(3)').eq(0); const attachLinkList = $attach .find('a')