{"action":"created","comment":{"url":"https://api.github.com/repos/DIYgod/RSSHub/pulls/comments/235873509","pull_request_review_id":177841187,"id":235873509,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTg3MzUwOQ==","diff_hunk":"@@ -2,66 +2,51 @@ const { resolve } = require('url');\n const cheerio = require('cheerio');\n const axios = require('../../utils/axios');\n \n-exports.getList = async (url) => {\n+exports.getSimple = async (url) => {\n     const { data } = await axios.get(url);\n     const $ = cheerio.load(data);\n \n     return $('.gallery a.cover')\n-        .map((_, ele) => createResult($, ele))\n-        .get();\n+        .map((_, ele) => parseSimpleDetail($(ele)))\n+        .toArray();\n };\n \n-exports.getDetail = async (url) => {\n-    const { data } = await axios.get(url);\n+exports.getDetails = async (cache, simples) => Promise.all(simples.map((simple) => cache.tryGet(simple.link, () => getDetail(simple), 24 * 60 * 60)));\n+\n+const parseSimpleDetail = ($ele) => {\n+    const link = resolve('https://nhentai.net', $ele.attr('href'));\n+    const thumb = $ele.children('img');\n+    const thumbSrc = thumb.attr('data-src') || thumb.attr('src');\n+    const highResoThumbSrc = thumbSrc.replace('thumb', '1').replace('t.nhentai.net', 'i.nhentai.net');\n+    return {\n+        title: $ele.children('.caption').text(),\n+        link,\n+        pubDate: new Date().toUTCString(), // 要获得准确时间需要对每个本子都请求一遍，很麻烦\n+        description: `<img referrerpolicy=\"no-referrer\" src=\"${highResoThumbSrc}\" />`,\n+    };\n+};\n+\n+const getDetail = async (simple) => {\n+    console.log('cache miss!');","path":"routes/nhentai/util.js","position":null,"original_position":34,"commit_id":"ee2e1275282a5b2dc1e769649e98e1183a293adf","original_commit_id":"365d0da7df90033d028e71f3dbea289d7634b940","user":{"login":"MegrezZhu","id":21364971,"node_id":"MDQ6VXNlcjIxMzY0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/21364971?v=4","gravatar_id":"","url":"https://api.github.com/users/MegrezZhu","html_url":"https://github.com/MegrezZhu","followers_url":"https://api.github.com/users/MegrezZhu/followers","following_url":"https://api.github.com/users/MegrezZhu/following{/other_user}","gists_url":"https://api.github.com/users/MegrezZhu/gists{/gist_id}","starred_url":"https://api.github.com/users/MegrezZhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegrezZhu/subscriptions","organizations_url":"https://api.github.com/users/MegrezZhu/orgs","repos_url":"https://api.github.com/users/MegrezZhu/repos","events_url":"https://api.github.com/users/MegrezZhu/events{/privacy}","received_events_url":"https://api.github.com/users/MegrezZhu/received_events","type":"User","site_admin":false},"body":"忘删了，抱歉","created_at":"2018-11-23T08:53:25Z","updated_at":"2018-11-23T08:53:25Z","html_url":"https://github.com/DIYgod/RSSHub/pull/1191#discussion_r235873509","pull_request_url":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DIYgod/RSSHub/pulls/comments/235873509"},"html":{"href":"https://github.com/DIYgod/RSSHub/pull/1191#discussion_r235873509"},"pull_request":{"href":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191"}},"in_reply_to_id":235872119},"pull_request":{"url":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191","id":233130762,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMTMwNzYy","html_url":"https://github.com/DIYgod/RSSHub/pull/1191","diff_url":"https://github.com/DIYgod/RSSHub/pull/1191.diff","patch_url":"https://github.com/DIYgod/RSSHub/pull/1191.patch","issue_url":"https://api.github.com/repos/DIYgod/RSSHub/issues/1191","number":1191,"state":"open","locked":false,"title":"nhentai: added simple mode","user":{"login":"MegrezZhu","id":21364971,"node_id":"MDQ6VXNlcjIxMzY0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/21364971?v=4","gravatar_id":"","url":"https://api.github.com/users/MegrezZhu","html_url":"https://github.com/MegrezZhu","followers_url":"https://api.github.com/users/MegrezZhu/followers","following_url":"https://api.github.com/users/MegrezZhu/following{/other_user}","gists_url":"https://api.github.com/users/MegrezZhu/gists{/gist_id}","starred_url":"https://api.github.com/users/MegrezZhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegrezZhu/subscriptions","organizations_url":"https://api.github.com/users/MegrezZhu/orgs","repos_url":"https://api.github.com/users/MegrezZhu/repos","events_url":"https://api.github.com/users/MegrezZhu/events{/privacy}","received_events_url":"https://api.github.com/users/MegrezZhu/received_events","type":"User","site_admin":false},"body":"close #1190 ","created_at":"2018-11-23T08:25:46Z","updated_at":"2018-11-23T08:53:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb6bcb9bc20bcde4edc3e4d42f1d41128f5af2a3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191/commits","review_comments_url":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191/comments","review_comment_url":"https://api.github.com/repos/DIYgod/RSSHub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DIYgod/RSSHub/issues/1191/comments","statuses_url":"https://api.github.com/repos/DIYgod/RSSHub/statuses/ee2e1275282a5b2dc1e769649e98e1183a293adf","head":{"label":"MegrezZhu:master","ref":"master","sha":"ee2e1275282a5b2dc1e769649e98e1183a293adf","user":{"login":"MegrezZhu","id":21364971,"node_id":"MDQ6VXNlcjIxMzY0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/21364971?v=4","gravatar_id":"","url":"https://api.github.com/users/MegrezZhu","html_url":"https://github.com/MegrezZhu","followers_url":"https://api.github.com/users/MegrezZhu/followers","following_url":"https://api.github.com/users/MegrezZhu/following{/other_user}","gists_url":"https://api.github.com/users/MegrezZhu/gists{/gist_id}","starred_url":"https://api.github.com/users/MegrezZhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegrezZhu/subscriptions","organizations_url":"https://api.github.com/users/MegrezZhu/orgs","repos_url":"https://api.github.com/users/MegrezZhu/repos","events_url":"https://api.github.com/users/MegrezZhu/events{/privacy}","received_events_url":"https://api.github.com/users/MegrezZhu/received_events","type":"User","site_admin":false},"repo":{"id":157662309,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc2NjIzMDk=","name":"RSSHub","full_name":"MegrezZhu/RSSHub","private":false,"owner":{"login":"MegrezZhu","id":21364971,"node_id":"MDQ6VXNlcjIxMzY0OTcx","avatar_url":"https://avatars3.githubusercontent.com/u/21364971?v=4","gravatar_id":"","url":"https://api.github.com/users/MegrezZhu","html_url":"https://github.com/MegrezZhu","followers_url":"https://api.github.com/users/MegrezZhu/followers","following_url":"https://api.github.com/users/MegrezZhu/following{/other_user}","gists_url":"https://api.github.com/users/MegrezZhu/gists{/gist_id}","starred_url":"https://api.github.com/users/MegrezZhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegrezZhu/subscriptions","organizations_url":"https://api.github.com/users/MegrezZhu/orgs","repos_url":"https://api.github.com/users/MegrezZhu/repos","events_url":"https://api.github.com/users/MegrezZhu/events{/privacy}","received_events_url":"https://api.github.com/users/MegrezZhu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MegrezZhu/RSSHub","description":"🍰 万物皆可 RSS","fork":true,"url":"https://api.github.com/repos/MegrezZhu/RSSHub","forks_url":"https://api.github.com/repos/MegrezZhu/RSSHub/forks","keys_url":"https://api.github.com/repos/MegrezZhu/RSSHub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MegrezZhu/RSSHub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MegrezZhu/RSSHub/teams","hooks_url":"https://api.github.com/repos/MegrezZhu/RSSHub/hooks","issue_events_url":"https://api.github.com/repos/MegrezZhu/RSSHub/issues/events{/number}","events_url":"https://api.github.com/repos/MegrezZhu/RSSHub/events","assignees_url":"https://api.github.com/repos/MegrezZhu/RSSHub/assignees{/user}","branches_url":"https://api.github.com/repos/MegrezZhu/RSSHub/branches{/branch}","tags_url":"https://api.github.com/repos/MegrezZhu/RSSHub/tags","blobs_url":"https://api.github.com/repos/MegrezZhu/RSSHub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MegrezZhu/RSSHub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MegrezZhu/RSSHub/git/refs{/sha}","trees_url":"https://api.github.com/repos/MegrezZhu/RSSHub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MegrezZhu/RSSHub/statuses/{sha}","languages_url":"https://api.github.com/repos/MegrezZhu/RSSHub/languages","stargazers_url":"https://api.github.com/repos/MegrezZhu/RSSHub/stargazers","contributors_url":"https://api.github.com/repos/MegrezZhu/RSSHub/contributors","subscribers_url":"https://api.github.com/repos/MegrezZhu/RSSHub/subscribers","subscription_url":"https://api.github.com/repos/MegrezZhu/RSSHub/subscription","commits_url":"https://api.github.com/repos/MegrezZhu/RSSHub/commits{/sha}","git_commits_url":"https://api.github.com/repos/MegrezZhu/RSSHub/git/commits{/sha}","comments_url":"https://api.github.com/repos/MegrezZhu/RSSHub/comments{/number}","issue_comment_url":"https://api.github.com/repos/MegrezZhu/RSSHub/issues/comments{/number}","contents_url":"https://api.github.com/repos/MegrezZhu/RSSHub/contents/{+path}","compare_url":"https://api.github.com/repos/MegrezZhu/RSSHub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MegrezZhu/RSSHub/merges","archive_url":"https://api.github.com/repos/MegrezZhu/RSSHub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MegrezZhu/RSSHub/downloads","issues_url":"https://api.github.com/repos/MegrezZhu/RSSHub/issues{/number}","pulls_url":"https://api.github.com/repos/MegrezZhu/RSSHub/pulls{/number}","milestones_url":"https://api.github.com/repos/MegrezZhu/RSSHub/milestones{/number}","notifications_url":"https://api.github.com/repos/MegrezZhu/RSSHub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MegrezZhu/RSSHub/labels{/name}","releases_url":"https://api.github.com/repos/MegrezZhu/RSSHub/releases{/id}","deployments_url":"https://api.github.com/repos/MegrezZhu/RSSHub/deployments","created_at":"2018-11-15T06:23:50Z","updated_at":"2018-11-23T08:52:33Z","pushed_at":"2018-11-23T08:52:31Z","git_url":"git://github.com/MegrezZhu/RSSHub.git","ssh_url":"git@github.com:MegrezZhu/RSSHub.git","clone_url":"https://github.com/MegrezZhu/RSSHub.git","svn_url":"https://github.com/MegrezZhu/RSSHub","homepage":"https://docs.rsshub.app","size":3154,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DIYgod:master","ref":"master","sha":"526f47fc9c92da769e3e64bd52cbfade827d176d","user":{"login":"DIYgod","id":8266075,"node_id":"MDQ6VXNlcjgyNjYwNzU=","avatar_url":"https://avatars2.githubusercontent.com/u/8266075?v=4","gravatar_id":"","url":"https://api.github.com/users/DIYgod","html_url":"https://github.com/DIYgod","followers_url":"https://api.github.com/users/DIYgod/followers","following_url":"https://api.github.com/users/DIYgod/following{/other_user}","gists_url":"https://api.github.com/users/DIYgod/gists{/gist_id}","starred_url":"https://api.github.com/users/DIYgod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIYgod/subscriptions","organizations_url":"https://api.github.com/users/DIYgod/orgs","repos_url":"https://api.github.com/users/DIYgod/repos","events_url":"https://api.github.com/users/DIYgod/events{/privacy}","received_events_url":"https://api.github.com/users/DIYgod/received_events","type":"User","site_admin":false},"repo":{"id":127769231,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc3NjkyMzE=","name":"RSSHub","full_name":"DIYgod/RSSHub","private":false,"owner":{"login":"DIYgod","id":8266075,"node_id":"MDQ6VXNlcjgyNjYwNzU=","avatar_url":"https://avatars2.githubusercontent.com/u/8266075?v=4","gravatar_id":"","url":"https://api.github.com/users/DIYgod","html_url":"https://github.com/DIYgod","followers_url":"https://api.github.com/users/DIYgod/followers","following_url":"https://api.github.com/users/DIYgod/following{/other_user}","gists_url":"https://api.github.com/users/DIYgod/gists{/gist_id}","starred_url":"https://api.github.com/users/DIYgod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIYgod/subscriptions","organizations_url":"https://api.github.com/users/DIYgod/orgs","repos_url":"https://api.github.com/users/DIYgod/repos","events_url":"https://api.github.com/users/DIYgod/events{/privacy}","received_events_url":"https://api.github.com/users/DIYgod/received_events","type":"User","site_admin":false},"html_url":"https://github.com/DIYgod/RSSHub","description":"🍰 万物皆可 RSS","fork":false,"url":"https://api.github.com/repos/DIYgod/RSSHub","forks_url":"https://api.github.com/repos/DIYgod/RSSHub/forks","keys_url":"https://api.github.com/repos/DIYgod/RSSHub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DIYgod/RSSHub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DIYgod/RSSHub/teams","hooks_url":"https://api.github.com/repos/DIYgod/RSSHub/hooks","issue_events_url":"https://api.github.com/repos/DIYgod/RSSHub/issues/events{/number}","events_url":"https://api.github.com/repos/DIYgod/RSSHub/events","assignees_url":"https://api.github.com/repos/DIYgod/RSSHub/assignees{/user}","branches_url":"https://api.github.com/repos/DIYgod/RSSHub/branches{/branch}","tags_url":"https://api.github.com/repos/DIYgod/RSSHub/tags","blobs_url":"https://api.github.com/repos/DIYgod/RSSHub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DIYgod/RSSHub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DIYgod/RSSHub/git/refs{/sha}","trees_url":"https://api.github.com/repos/DIYgod/RSSHub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DIYgod/RSSHub/statuses/{sha}","languages_url":"https://api.github.com/repos/DIYgod/RSSHub/languages","stargazers_url":"https://api.github.com/repos/DIYgod/RSSHub/stargazers","contributors_url":"https://api.github.com/repos/DIYgod/RSSHub/contributors","subscribers_url":"https://api.github.com/repos/DIYgod/RSSHub/subscribers","subscription_url":"https://api.github.com/repos/DIYgod/RSSHub/subscription","commits_url":"https://api.github.com/repos/DIYgod/RSSHub/commits{/sha}","git_commits_url":"https://api.github.com/repos/DIYgod/RSSHub/git/commits{/sha}","comments_url":"https://api.github.com/repos/DIYgod/RSSHub/comments{/number}","issue_comment_url":"https://api.github.com/repos/DIYgod/RSSHub/issues/comments{/number}","contents_url":"https://api.github.com/repos/DIYgod/RSSHub/contents/{+path}","compare_url":"https://api.github.com/repos/DIYgod/RSSHub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DIYgod/RSSHub/merges","archive_url":"https://api.github.com/repos/DIYgod/RSSHub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DIYgod/RSSHub/downloads","issues_url":"https://api.github.com/repos/DIYgod/RSSHub/issues{/number}","pulls_url":"https://api.github.com/repos/DIYgod/RSSHub/pulls{/number}","milestones_url":"https://api.github.com/repos/DIYgod/RSSHub/milestones{/number}","notifications_url":"https://api.github.com/repos/DIYgod/RSSHub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DIYgod/RSSHub/labels{/name}","releases_url":"https://api.github.com/repos/DIYgod/RSSHub/releases{/id}","deployments_url":"https://api.github.com/repos/DIYgod/RSSHub/deployments","created_at":"2018-04-02T14:43:21Z","updated_at":"2018-11-23T07:41:36Z","pushed_at":"2018-11-23T08:52:32Z","git_url":"git://github.com/DIYgod/RSSHub.git","ssh_url":"git@github.com:DIYgod/RSSHub.git","clone_url":"https://github.com/DIYgod/RSSHub.git","svn_url":"https://github.com/DIYgod/RSSHub","homepage":"https://docs.rsshub.app","size":3270,"stargazers_count":4771,"watchers_count":4771,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":495,"mirror_url":null,"archived":false,"open_issues_count":70,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":495,"open_issues":70,"watchers":4771,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191"},"html":{"href":"https://github.com/DIYgod/RSSHub/pull/1191"},"issue":{"href":"https://api.github.com/repos/DIYgod/RSSHub/issues/1191"},"comments":{"href":"https://api.github.com/repos/DIYgod/RSSHub/issues/1191/comments"},"review_comments":{"href":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191/comments"},"review_comment":{"href":"https://api.github.com/repos/DIYgod/RSSHub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DIYgod/RSSHub/pulls/1191/commits"},"statuses":{"href":"https://api.github.com/repos/DIYgod/RSSHub/statuses/ee2e1275282a5b2dc1e769649e98e1183a293adf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MegrezZhu"}}