diff --git a/lib/routes/facebook/page.js b/lib/routes/facebook/page.js index c2f0c3a10..7f9ba36d9 100644 --- a/lib/routes/facebook/page.js +++ b/lib/routes/facebook/page.js @@ -80,9 +80,10 @@ module.exports = async (ctx) => { const html = await fetchPageHtml(linkPath, pageId, ctx.cache); const $ = cheerio.load(html); - const itemLinks = $('div[role=article] > div:nth-child(2) > div:nth-child(2)') + const itemLinks = $('footer > div:nth-child(2) > a:nth-child(1)') .toArray() - .map((div) => $(div).find('a').last().attr('href')); + .map((a) => $(a).attr('href')); + const items = await Promise.all( itemLinks.map(async (itemLink) => { if (new RegExp(`^/.+/photos/`).test(itemLink)) {