{"action":"created","comment":{"url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/comments/212797891","pull_request_review_id":149509140,"id":212797891,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjc5Nzg5MQ==","diff_hunk":"@@ -52,8 +52,16 @@ def get_article_info(url)\n     end\n \n     # bodyを取得\n-    if page.at('p').inner_text\n-      results[:body] = page.at('p').inner_text\n+    results[:body] = \"\"\n+    if page.search('p')\n+      texts = page.search('p')\n+      i = 0\n+      while results[:body].length <= 40\n+        results[:body] = results[:body] + texts[i]","path":"app/models/pick.rb","position":20,"original_position":20,"commit_id":"14735f9ffdff9388cf5ad7d8b863f1e74a3a0607","original_commit_id":"14735f9ffdff9388cf5ad7d8b863f1e74a3a0607","user":{"login":"yukiraicom","id":36536316,"node_id":"MDQ6VXNlcjM2NTM2MzE2","avatar_url":"https://avatars1.githubusercontent.com/u/36536316?v=4","gravatar_id":"","url":"https://api.github.com/users/yukiraicom","html_url":"https://github.com/yukiraicom","followers_url":"https://api.github.com/users/yukiraicom/followers","following_url":"https://api.github.com/users/yukiraicom/following{/other_user}","gists_url":"https://api.github.com/users/yukiraicom/gists{/gist_id}","starred_url":"https://api.github.com/users/yukiraicom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukiraicom/subscriptions","organizations_url":"https://api.github.com/users/yukiraicom/orgs","repos_url":"https://api.github.com/users/yukiraicom/repos","events_url":"https://api.github.com/users/yukiraicom/events{/privacy}","received_events_url":"https://api.github.com/users/yukiraicom/received_events","type":"User","site_admin":false},"body":"ここは+=の形にしなかったのですか？","created_at":"2018-08-25T12:56:01Z","updated_at":"2018-08-25T12:56:51Z","html_url":"https://github.com/MasahiroKitazoe/newspicks_teamA/pull/17#discussion_r212797891","pull_request_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/comments/212797891"},"html":{"href":"https://github.com/MasahiroKitazoe/newspicks_teamA/pull/17#discussion_r212797891"},"pull_request":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17","id":210899931,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwODk5OTMx","html_url":"https://github.com/MasahiroKitazoe/newspicks_teamA/pull/17","diff_url":"https://github.com/MasahiroKitazoe/newspicks_teamA/pull/17.diff","patch_url":"https://github.com/MasahiroKitazoe/newspicks_teamA/pull/17.patch","issue_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/17","number":17,"state":"open","locked":false,"title":"Picksスクレイピング結果のインクリメンタルサーチ","user":{"login":"MasahiroKitazoe","id":23625249,"node_id":"MDQ6VXNlcjIzNjI1MjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/23625249?v=4","gravatar_id":"","url":"https://api.github.com/users/MasahiroKitazoe","html_url":"https://github.com/MasahiroKitazoe","followers_url":"https://api.github.com/users/MasahiroKitazoe/followers","following_url":"https://api.github.com/users/MasahiroKitazoe/following{/other_user}","gists_url":"https://api.github.com/users/MasahiroKitazoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MasahiroKitazoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasahiroKitazoe/subscriptions","organizations_url":"https://api.github.com/users/MasahiroKitazoe/orgs","repos_url":"https://api.github.com/users/MasahiroKitazoe/repos","events_url":"https://api.github.com/users/MasahiroKitazoe/events{/privacy}","received_events_url":"https://api.github.com/users/MasahiroKitazoe/received_events","type":"User","site_admin":false},"body":"# What\r\n- 新しいpickを投稿する際に、投稿する前にスクレイピングされた結果を確認できるようにする\r\n- ajaxでpicksコントローラーのsearchメソッドを動かし、スクレイピングを実行させる\r\n- ajax通信が成功すれば、スクレイピングの結果をビューに表示する\r\n- ajax通信が失敗したら、URLが見つからなかった旨のメッセージを表示する\r\n\r\n# Why\r\n- UX向上のため\r\n\r\nhttps://gyazo.com/153bfcdfc7c23c770617964e7b3c0f98","created_at":"2018-08-25T12:07:59Z","updated_at":"2018-08-25T12:56:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7faf883b441a8e9d92e94f816f3a59f904ce5923","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17/commits","review_comments_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17/comments","review_comment_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/17/comments","statuses_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/statuses/14735f9ffdff9388cf5ad7d8b863f1e74a3a0607","head":{"label":"MasahiroKitazoe:picks","ref":"picks","sha":"14735f9ffdff9388cf5ad7d8b863f1e74a3a0607","user":{"login":"MasahiroKitazoe","id":23625249,"node_id":"MDQ6VXNlcjIzNjI1MjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/23625249?v=4","gravatar_id":"","url":"https://api.github.com/users/MasahiroKitazoe","html_url":"https://github.com/MasahiroKitazoe","followers_url":"https://api.github.com/users/MasahiroKitazoe/followers","following_url":"https://api.github.com/users/MasahiroKitazoe/following{/other_user}","gists_url":"https://api.github.com/users/MasahiroKitazoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MasahiroKitazoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasahiroKitazoe/subscriptions","organizations_url":"https://api.github.com/users/MasahiroKitazoe/orgs","repos_url":"https://api.github.com/users/MasahiroKitazoe/repos","events_url":"https://api.github.com/users/MasahiroKitazoe/events{/privacy}","received_events_url":"https://api.github.com/users/MasahiroKitazoe/received_events","type":"User","site_admin":false},"repo":{"id":145368823,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUzNjg4MjM=","name":"newspicks_teamA","full_name":"MasahiroKitazoe/newspicks_teamA","owner":{"login":"MasahiroKitazoe","id":23625249,"node_id":"MDQ6VXNlcjIzNjI1MjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/23625249?v=4","gravatar_id":"","url":"https://api.github.com/users/MasahiroKitazoe","html_url":"https://github.com/MasahiroKitazoe","followers_url":"https://api.github.com/users/MasahiroKitazoe/followers","following_url":"https://api.github.com/users/MasahiroKitazoe/following{/other_user}","gists_url":"https://api.github.com/users/MasahiroKitazoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MasahiroKitazoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasahiroKitazoe/subscriptions","organizations_url":"https://api.github.com/users/MasahiroKitazoe/orgs","repos_url":"https://api.github.com/users/MasahiroKitazoe/repos","events_url":"https://api.github.com/users/MasahiroKitazoe/events{/privacy}","received_events_url":"https://api.github.com/users/MasahiroKitazoe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MasahiroKitazoe/newspicks_teamA","description":null,"fork":false,"url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA","forks_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/forks","keys_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/teams","hooks_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/hooks","issue_events_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/events{/number}","events_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/events","assignees_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/assignees{/user}","branches_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/branches{/branch}","tags_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/tags","blobs_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/refs{/sha}","trees_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/statuses/{sha}","languages_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/languages","stargazers_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/stargazers","contributors_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/contributors","subscribers_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/subscribers","subscription_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/subscription","commits_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/commits{/sha}","git_commits_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/commits{/sha}","comments_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/comments{/number}","issue_comment_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/comments{/number}","contents_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/contents/{+path}","compare_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/merges","archive_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/downloads","issues_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues{/number}","pulls_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls{/number}","milestones_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/milestones{/number}","notifications_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/labels{/name}","releases_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/releases{/id}","deployments_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/deployments","created_at":"2018-08-20T05:10:08Z","updated_at":"2018-08-25T08:57:11Z","pushed_at":"2018-08-25T12:12:01Z","git_url":"git://github.com/MasahiroKitazoe/newspicks_teamA.git","ssh_url":"git@github.com:MasahiroKitazoe/newspicks_teamA.git","clone_url":"https://github.com/MasahiroKitazoe/newspicks_teamA.git","svn_url":"https://github.com/MasahiroKitazoe/newspicks_teamA","homepage":null,"size":221,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"MasahiroKitazoe:master","ref":"master","sha":"584848fe6e73f783d2ecc6f71b63e4c7a1bac601","user":{"login":"MasahiroKitazoe","id":23625249,"node_id":"MDQ6VXNlcjIzNjI1MjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/23625249?v=4","gravatar_id":"","url":"https://api.github.com/users/MasahiroKitazoe","html_url":"https://github.com/MasahiroKitazoe","followers_url":"https://api.github.com/users/MasahiroKitazoe/followers","following_url":"https://api.github.com/users/MasahiroKitazoe/following{/other_user}","gists_url":"https://api.github.com/users/MasahiroKitazoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MasahiroKitazoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasahiroKitazoe/subscriptions","organizations_url":"https://api.github.com/users/MasahiroKitazoe/orgs","repos_url":"https://api.github.com/users/MasahiroKitazoe/repos","events_url":"https://api.github.com/users/MasahiroKitazoe/events{/privacy}","received_events_url":"https://api.github.com/users/MasahiroKitazoe/received_events","type":"User","site_admin":false},"repo":{"id":145368823,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUzNjg4MjM=","name":"newspicks_teamA","full_name":"MasahiroKitazoe/newspicks_teamA","owner":{"login":"MasahiroKitazoe","id":23625249,"node_id":"MDQ6VXNlcjIzNjI1MjQ5","avatar_url":"https://avatars1.githubusercontent.com/u/23625249?v=4","gravatar_id":"","url":"https://api.github.com/users/MasahiroKitazoe","html_url":"https://github.com/MasahiroKitazoe","followers_url":"https://api.github.com/users/MasahiroKitazoe/followers","following_url":"https://api.github.com/users/MasahiroKitazoe/following{/other_user}","gists_url":"https://api.github.com/users/MasahiroKitazoe/gists{/gist_id}","starred_url":"https://api.github.com/users/MasahiroKitazoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasahiroKitazoe/subscriptions","organizations_url":"https://api.github.com/users/MasahiroKitazoe/orgs","repos_url":"https://api.github.com/users/MasahiroKitazoe/repos","events_url":"https://api.github.com/users/MasahiroKitazoe/events{/privacy}","received_events_url":"https://api.github.com/users/MasahiroKitazoe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MasahiroKitazoe/newspicks_teamA","description":null,"fork":false,"url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA","forks_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/forks","keys_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/teams","hooks_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/hooks","issue_events_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/events{/number}","events_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/events","assignees_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/assignees{/user}","branches_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/branches{/branch}","tags_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/tags","blobs_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/refs{/sha}","trees_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/statuses/{sha}","languages_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/languages","stargazers_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/stargazers","contributors_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/contributors","subscribers_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/subscribers","subscription_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/subscription","commits_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/commits{/sha}","git_commits_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/git/commits{/sha}","comments_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/comments{/number}","issue_comment_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/comments{/number}","contents_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/contents/{+path}","compare_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/merges","archive_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/downloads","issues_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues{/number}","pulls_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls{/number}","milestones_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/milestones{/number}","notifications_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/labels{/name}","releases_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/releases{/id}","deployments_url":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/deployments","created_at":"2018-08-20T05:10:08Z","updated_at":"2018-08-25T08:57:11Z","pushed_at":"2018-08-25T12:12:01Z","git_url":"git://github.com/MasahiroKitazoe/newspicks_teamA.git","ssh_url":"git@github.com:MasahiroKitazoe/newspicks_teamA.git","clone_url":"https://github.com/MasahiroKitazoe/newspicks_teamA.git","svn_url":"https://github.com/MasahiroKitazoe/newspicks_teamA","homepage":null,"size":221,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17"},"html":{"href":"https://github.com/MasahiroKitazoe/newspicks_teamA/pull/17"},"issue":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/17"},"comments":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/MasahiroKitazoe/newspicks_teamA/statuses/14735f9ffdff9388cf5ad7d8b863f1e74a3a0607"}},"author_association":"OWNER"}}
{"actor":{"display_login":"yukiraicom"}}