diff --git a/docker-compose.yml b/docker-compose.yml index 238c7e35a..08fa2adeb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,8 @@ services: - browserless browserless: - image: browserless/chrome + # See issue 6680 + image: browserless/chrome:1.43-chrome-stable restart: always redis: diff --git a/lib/routes/hentai-cosplays/utils.js b/lib/routes/hentai-cosplays/utils.js index 85be00b28..bbe000d79 100644 --- a/lib/routes/hentai-cosplays/utils.js +++ b/lib/routes/hentai-cosplays/utils.js @@ -20,7 +20,7 @@ exports.processFeed = async function processFeed(ctx, link) { list.map(async (info) => { const title = info.title.trim(); const date = info.date; - const itemUrl = host + info.link; + const itemUrl = host + 'story' + info.link.replace('/image', ''); const cache = await ctx.cache.get(itemUrl); if (cache) { @@ -29,15 +29,21 @@ exports.processFeed = async function processFeed(ctx, link) { const response = await got.get(itemUrl); const $ = cheerio.load(response.data); - const images = $('.icon-overlay > a > img'); - const desc = cheerio.html(images); + const images = $('amp-img') + .map(function (index, element) { + element = $(element); + const img_src = element.attr('src'); + return ``; + }) + .get() + .join(' '); const item = { title: title, link: itemUrl, - description: desc, + description: images, pubDate: new Date(date).toUTCString(), }; - if (desc) { + if (images) { ctx.cache.set(itemUrl, JSON.stringify(item)); } return Promise.resolve(item); diff --git a/scripts/ansible/rsshub.yaml b/scripts/ansible/rsshub.yaml index 33671a51c..0affa63bd 100644 --- a/scripts/ansible/rsshub.yaml +++ b/scripts/ansible/rsshub.yaml @@ -82,7 +82,7 @@ name: Create and start browserless container docker_container: name: browserless - image: browserless/chrome + image: browserless/chrome:1.43-chrome-stable state: started restart_policy: always published_ports: diff --git a/scripts/workflow/test-route/identify.js b/scripts/workflow/test-route/identify.js index 7fcf08fe4..1348642f6 100644 --- a/scripts/workflow/test-route/identify.js +++ b/scripts/workflow/test-route/identify.js @@ -71,7 +71,7 @@ Auto Route test failed, please check your PR body format and reopen pull request .update({ owner: context.repo.owner, repo: context.repo.repo, - pull_nulber: number, + pull_number: number, state: 'closed', }) .catch((e) => {