{"action":"created","comment":{"url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/comments/114385133","pull_request_review_id":35846688,"id":114385133,"diff_hunk":"@@ -0,0 +1,103 @@\n+'use strict';\n+\n+const libingester = require('libingester');\n+const mustache = require('mustache');\n+const request = require('request');\n+const rp = require('request-promise');\n+const rss2json = require('rss-to-json');\n+const template = require('./template');\n+const url = require('url');\n+\n+const rss_uri = 'https://beritagar.id/rss'; //Artists\n+const base_uri = 'https://beritagar.id/';\n+\n+//Remove elements (body)\n+const remove_elements = [\n+    'div.article-sharer',\n+    'div.gallery-list',\n+    'div.gallery-navigation',\n+    'div.gallery-single',\n+    'iframe',\n+];\n+// clean images\n+const remove_attr_img = [\n+    'data-src',\n+];\n+\n+function ingest_article(hatch, uri) {\n+    return libingester.util.fetch_html(uri).then(($) => {\n+        const base_uri = libingester.util.get_doc_base_uri($, uri);\n+        const asset = new libingester.NewsArticle();\n+        const section = $('meta[property=\"article:section\"]').attr('content');\n+        asset.set_section(section);\n+\n+        //Set title section\n+        const title = $('meta[property=\"og:title\"]').attr('content');\n+        asset.set_title(title);\n+        asset.set_canonical_uri(uri);\n+\n+        // select body for 'galery' or 'article'\n+        if( section === 'GALERI' )\n+            var body = $('div.gallery-all').first();","path":"beritagar/index.js","position":41,"original_position":41,"commit_id":"bbe2fb43ee32d5af94db8fe6a4b93166a58016e0","original_commit_id":"bbe2fb43ee32d5af94db8fe6a4b93166a58016e0","user":{"login":"cammend","id":5414841,"avatar_url":"https://avatars0.githubusercontent.com/u/5414841?v=3","gravatar_id":"","url":"https://api.github.com/users/cammend","html_url":"https://github.com/cammend","followers_url":"https://api.github.com/users/cammend/followers","following_url":"https://api.github.com/users/cammend/following{/other_user}","gists_url":"https://api.github.com/users/cammend/gists{/gist_id}","starred_url":"https://api.github.com/users/cammend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cammend/subscriptions","organizations_url":"https://api.github.com/users/cammend/orgs","repos_url":"https://api.github.com/users/cammend/repos","events_url":"https://api.github.com/users/cammend/events{/privacy}","received_events_url":"https://api.github.com/users/cammend/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2017-05-02T18:06:07Z","updated_at":"2017-05-02T18:06:07Z","html_url":"https://github.com/atellezsazo/gp-ingestors/pull/7#discussion_r114385133","pull_request_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/comments/114385133"},"html":{"href":"https://github.com/atellezsazo/gp-ingestors/pull/7#discussion_r114385133"},"pull_request":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7","id":117598753,"html_url":"https://github.com/atellezsazo/gp-ingestors/pull/7","diff_url":"https://github.com/atellezsazo/gp-ingestors/pull/7.diff","patch_url":"https://github.com/atellezsazo/gp-ingestors/pull/7.patch","issue_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/7","number":7,"state":"open","locked":false,"title":"Beritagar","user":{"login":"cammend","id":5414841,"avatar_url":"https://avatars0.githubusercontent.com/u/5414841?v=3","gravatar_id":"","url":"https://api.github.com/users/cammend","html_url":"https://github.com/cammend","followers_url":"https://api.github.com/users/cammend/followers","following_url":"https://api.github.com/users/cammend/following{/other_user}","gists_url":"https://api.github.com/users/cammend/gists{/gist_id}","starred_url":"https://api.github.com/users/cammend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cammend/subscriptions","organizations_url":"https://api.github.com/users/cammend/orgs","repos_url":"https://api.github.com/users/cammend/repos","events_url":"https://api.github.com/users/cammend/events{/privacy}","received_events_url":"https://api.github.com/users/cammend/received_events","type":"User","site_admin":false},"body":"Iniciado ingestor para https://beritagar.id/","created_at":"2017-04-25T22:58:00Z","updated_at":"2017-05-02T18:06:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0f5fc245c5301a30b5f9f24d9bcd9c7a882f986","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7/commits","review_comments_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7/comments","review_comment_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/7/comments","statuses_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/statuses/bbe2fb43ee32d5af94db8fe6a4b93166a58016e0","head":{"label":"atellezsazo:beritagar","ref":"beritagar","sha":"bbe2fb43ee32d5af94db8fe6a4b93166a58016e0","user":{"login":"atellezsazo","id":8549899,"avatar_url":"https://avatars0.githubusercontent.com/u/8549899?v=3","gravatar_id":"","url":"https://api.github.com/users/atellezsazo","html_url":"https://github.com/atellezsazo","followers_url":"https://api.github.com/users/atellezsazo/followers","following_url":"https://api.github.com/users/atellezsazo/following{/other_user}","gists_url":"https://api.github.com/users/atellezsazo/gists{/gist_id}","starred_url":"https://api.github.com/users/atellezsazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atellezsazo/subscriptions","organizations_url":"https://api.github.com/users/atellezsazo/orgs","repos_url":"https://api.github.com/users/atellezsazo/repos","events_url":"https://api.github.com/users/atellezsazo/events{/privacy}","received_events_url":"https://api.github.com/users/atellezsazo/received_events","type":"User","site_admin":false},"repo":{"id":84586519,"name":"gp-ingestors","full_name":"atellezsazo/gp-ingestors","owner":{"login":"atellezsazo","id":8549899,"avatar_url":"https://avatars0.githubusercontent.com/u/8549899?v=3","gravatar_id":"","url":"https://api.github.com/users/atellezsazo","html_url":"https://github.com/atellezsazo","followers_url":"https://api.github.com/users/atellezsazo/followers","following_url":"https://api.github.com/users/atellezsazo/following{/other_user}","gists_url":"https://api.github.com/users/atellezsazo/gists{/gist_id}","starred_url":"https://api.github.com/users/atellezsazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atellezsazo/subscriptions","organizations_url":"https://api.github.com/users/atellezsazo/orgs","repos_url":"https://api.github.com/users/atellezsazo/repos","events_url":"https://api.github.com/users/atellezsazo/events{/privacy}","received_events_url":"https://api.github.com/users/atellezsazo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atellezsazo/gp-ingestors","description":null,"fork":false,"url":"https://api.github.com/repos/atellezsazo/gp-ingestors","forks_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/forks","keys_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/teams","hooks_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/hooks","issue_events_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/events{/number}","events_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/events","assignees_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/assignees{/user}","branches_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/branches{/branch}","tags_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/tags","blobs_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/refs{/sha}","trees_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/statuses/{sha}","languages_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/languages","stargazers_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/stargazers","contributors_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/contributors","subscribers_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/subscribers","subscription_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/subscription","commits_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/commits{/sha}","git_commits_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/commits{/sha}","comments_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/comments{/number}","issue_comment_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/comments{/number}","contents_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/contents/{+path}","compare_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/merges","archive_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/downloads","issues_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues{/number}","pulls_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls{/number}","milestones_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/milestones{/number}","notifications_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/labels{/name}","releases_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/releases{/id}","deployments_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/deployments","created_at":"2017-03-10T17:54:56Z","updated_at":"2017-04-27T17:17:46Z","pushed_at":"2017-05-02T17:16:44Z","git_url":"git://github.com/atellezsazo/gp-ingestors.git","ssh_url":"git@github.com:atellezsazo/gp-ingestors.git","clone_url":"https://github.com/atellezsazo/gp-ingestors.git","svn_url":"https://github.com/atellezsazo/gp-ingestors","homepage":null,"size":60,"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,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"atellezsazo:master","ref":"master","sha":"790fa19a66f28e674a8b9a0f1919fe31c6efe574","user":{"login":"atellezsazo","id":8549899,"avatar_url":"https://avatars0.githubusercontent.com/u/8549899?v=3","gravatar_id":"","url":"https://api.github.com/users/atellezsazo","html_url":"https://github.com/atellezsazo","followers_url":"https://api.github.com/users/atellezsazo/followers","following_url":"https://api.github.com/users/atellezsazo/following{/other_user}","gists_url":"https://api.github.com/users/atellezsazo/gists{/gist_id}","starred_url":"https://api.github.com/users/atellezsazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atellezsazo/subscriptions","organizations_url":"https://api.github.com/users/atellezsazo/orgs","repos_url":"https://api.github.com/users/atellezsazo/repos","events_url":"https://api.github.com/users/atellezsazo/events{/privacy}","received_events_url":"https://api.github.com/users/atellezsazo/received_events","type":"User","site_admin":false},"repo":{"id":84586519,"name":"gp-ingestors","full_name":"atellezsazo/gp-ingestors","owner":{"login":"atellezsazo","id":8549899,"avatar_url":"https://avatars0.githubusercontent.com/u/8549899?v=3","gravatar_id":"","url":"https://api.github.com/users/atellezsazo","html_url":"https://github.com/atellezsazo","followers_url":"https://api.github.com/users/atellezsazo/followers","following_url":"https://api.github.com/users/atellezsazo/following{/other_user}","gists_url":"https://api.github.com/users/atellezsazo/gists{/gist_id}","starred_url":"https://api.github.com/users/atellezsazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atellezsazo/subscriptions","organizations_url":"https://api.github.com/users/atellezsazo/orgs","repos_url":"https://api.github.com/users/atellezsazo/repos","events_url":"https://api.github.com/users/atellezsazo/events{/privacy}","received_events_url":"https://api.github.com/users/atellezsazo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atellezsazo/gp-ingestors","description":null,"fork":false,"url":"https://api.github.com/repos/atellezsazo/gp-ingestors","forks_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/forks","keys_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/teams","hooks_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/hooks","issue_events_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/events{/number}","events_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/events","assignees_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/assignees{/user}","branches_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/branches{/branch}","tags_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/tags","blobs_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/refs{/sha}","trees_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/statuses/{sha}","languages_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/languages","stargazers_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/stargazers","contributors_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/contributors","subscribers_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/subscribers","subscription_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/subscription","commits_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/commits{/sha}","git_commits_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/git/commits{/sha}","comments_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/comments{/number}","issue_comment_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/comments{/number}","contents_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/contents/{+path}","compare_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/merges","archive_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/downloads","issues_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues{/number}","pulls_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls{/number}","milestones_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/milestones{/number}","notifications_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/labels{/name}","releases_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/releases{/id}","deployments_url":"https://api.github.com/repos/atellezsazo/gp-ingestors/deployments","created_at":"2017-03-10T17:54:56Z","updated_at":"2017-04-27T17:17:46Z","pushed_at":"2017-05-02T17:16:44Z","git_url":"git://github.com/atellezsazo/gp-ingestors.git","ssh_url":"git@github.com:atellezsazo/gp-ingestors.git","clone_url":"https://github.com/atellezsazo/gp-ingestors.git","svn_url":"https://github.com/atellezsazo/gp-ingestors","homepage":null,"size":60,"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,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7"},"html":{"href":"https://github.com/atellezsazo/gp-ingestors/pull/7"},"issue":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/7"},"comments":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/atellezsazo/gp-ingestors/statuses/bbe2fb43ee32d5af94db8fe6a4b93166a58016e0"}}}}
{"actor":{"display_login":"cammend"}}