{"action":"created","comment":{"url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/comments/50712252","id":50712252,"diff_hunk":"@@ -0,0 +1,77 @@\n+from bs4 import BeautifulSoup\n+import requests\n+from models import Coffee\n+import logging\n+\n+# scraping Blue Bottle roasters\n+\n+def scrape_bluebottle():\n+\n+    roaster = 'Blue Bottle'\n+    bluebottle = 'https://bluebottlecoffee.com/store/coffee'\n+    r = requests.get(bluebottle)\n+    soup = BeautifulSoup(r.content)\n+    coffees_for_sale = soup.find_all('h2', {'class':'f5 lh-title man'})\n+    total_coffees = len(coffees_for_sale)\n+    coffees_entered = 0\n+    coffees_updated = 0\n+    error_coffees = []\n+    ignored = ['Box', 'Kit', 'Subscriptions', 'at Home']\n+    for item in coffees_for_sale:\n+        name,description,notes,region,active,size, product_url = [\"\"]*7\n+        price = float()\n+        name = item.string\n+        if any(word in name for word in ignored):\n+            total_coffees -= 1\n+        else:\n+            url = item.a['href']\n+            product_url = 'https://bluebottlecoffee.com' + url\n+            logging.info(\"Getting url: {}\".format(url))\n+            r = requests.get(product_url)\n+            coffee_soup = BeautifulSoup(r.content)\n+            active = True\n+            price = float(coffee_soup.find('span', {'class':'js-variant-price'}).string[1:])\n+            description = coffee_soup.find('p', {'class':'spec-overview'}).string\n+            notes = coffee_soup.p.string.lower().split(',')\n+            try:\n+                # only works for not single origin\n+                region = coffee_soup.find('p', {'class':'spec-details'}).contents[0].strip()","path":"scrapers/bluebottle.py","position":38,"original_position":38,"commit_id":"00a26594c024bd21d098fe8c402fa3515fdd8ff7","original_commit_id":"00a26594c024bd21d098fe8c402fa3515fdd8ff7","user":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"body":"I dont see the class `spec-details` anywhere on any page","created_at":"2016-01-25T15:57:42Z","updated_at":"2016-01-25T15:57:42Z","html_url":"https://github.com/jinpark/tellmeabout.coffee/pull/51#discussion_r50712252","pull_request_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/comments/50712252"},"html":{"href":"https://github.com/jinpark/tellmeabout.coffee/pull/51#discussion_r50712252"},"pull_request":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51","id":57011839,"html_url":"https://github.com/jinpark/tellmeabout.coffee/pull/51","diff_url":"https://github.com/jinpark/tellmeabout.coffee/pull/51.diff","patch_url":"https://github.com/jinpark/tellmeabout.coffee/pull/51.patch","issue_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/51","number":51,"state":"open","locked":false,"title":"Blue bottle","user":{"login":"billyfung","id":1535371,"avatar_url":"https://avatars.githubusercontent.com/u/1535371?v=3","gravatar_id":"","url":"https://api.github.com/users/billyfung","html_url":"https://github.com/billyfung","followers_url":"https://api.github.com/users/billyfung/followers","following_url":"https://api.github.com/users/billyfung/following{/other_user}","gists_url":"https://api.github.com/users/billyfung/gists{/gist_id}","starred_url":"https://api.github.com/users/billyfung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billyfung/subscriptions","organizations_url":"https://api.github.com/users/billyfung/orgs","repos_url":"https://api.github.com/users/billyfung/repos","events_url":"https://api.github.com/users/billyfung/events{/privacy}","received_events_url":"https://api.github.com/users/billyfung/received_events","type":"User","site_admin":false},"body":"for #48\r\n\r\nscraper for Blue Bottle","created_at":"2016-01-24T19:50:33Z","updated_at":"2016-01-25T15:57:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4850e756d7ae41a0c14a540663f08e2edc9e7ecb","assignee":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/milestones/1","html_url":"https://github.com/jinpark/tellmeabout.coffee/milestones/0.0.2","labels_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/milestones/1/labels","id":1537730,"number":1,"title":"0.0.2","description":"","creator":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":6,"state":"open","created_at":"2016-01-23T04:00:16Z","updated_at":"2016-01-25T03:31:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51/commits","review_comments_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51/comments","review_comment_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/51/comments","statuses_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/statuses/00a26594c024bd21d098fe8c402fa3515fdd8ff7","head":{"label":"jinpark:blue-bottle","ref":"blue-bottle","sha":"00a26594c024bd21d098fe8c402fa3515fdd8ff7","user":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"repo":{"id":49410593,"name":"tellmeabout.coffee","full_name":"jinpark/tellmeabout.coffee","owner":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jinpark/tellmeabout.coffee","description":"tells you about coffee","fork":false,"url":"https://api.github.com/repos/jinpark/tellmeabout.coffee","forks_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/forks","keys_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/teams","hooks_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/hooks","issue_events_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/events{/number}","events_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/events","assignees_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/assignees{/user}","branches_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/branches{/branch}","tags_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/tags","blobs_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/refs{/sha}","trees_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/statuses/{sha}","languages_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/languages","stargazers_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/stargazers","contributors_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/contributors","subscribers_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/subscribers","subscription_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/subscription","commits_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/commits{/sha}","git_commits_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/commits{/sha}","comments_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/comments{/number}","issue_comment_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/comments{/number}","contents_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/contents/{+path}","compare_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/merges","archive_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/downloads","issues_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues{/number}","pulls_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls{/number}","milestones_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/milestones{/number}","notifications_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/labels{/name}","releases_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/releases{/id}","deployments_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/deployments","created_at":"2016-01-11T07:51:31Z","updated_at":"2016-01-23T13:23:34Z","pushed_at":"2016-01-25T03:31:13Z","git_url":"git://github.com/jinpark/tellmeabout.coffee.git","ssh_url":"git@github.com:jinpark/tellmeabout.coffee.git","clone_url":"https://github.com/jinpark/tellmeabout.coffee.git","svn_url":"https://github.com/jinpark/tellmeabout.coffee","homepage":"http://tellmeabout.coffee","size":3593,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":1,"default_branch":"master"}},"base":{"label":"jinpark:master","ref":"master","sha":"9d4aa403203849317ab5bfa8fa9d0ef38ea2c058","user":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"repo":{"id":49410593,"name":"tellmeabout.coffee","full_name":"jinpark/tellmeabout.coffee","owner":{"login":"jinpark","id":1847812,"avatar_url":"https://avatars.githubusercontent.com/u/1847812?v=3","gravatar_id":"","url":"https://api.github.com/users/jinpark","html_url":"https://github.com/jinpark","followers_url":"https://api.github.com/users/jinpark/followers","following_url":"https://api.github.com/users/jinpark/following{/other_user}","gists_url":"https://api.github.com/users/jinpark/gists{/gist_id}","starred_url":"https://api.github.com/users/jinpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinpark/subscriptions","organizations_url":"https://api.github.com/users/jinpark/orgs","repos_url":"https://api.github.com/users/jinpark/repos","events_url":"https://api.github.com/users/jinpark/events{/privacy}","received_events_url":"https://api.github.com/users/jinpark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jinpark/tellmeabout.coffee","description":"tells you about coffee","fork":false,"url":"https://api.github.com/repos/jinpark/tellmeabout.coffee","forks_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/forks","keys_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/teams","hooks_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/hooks","issue_events_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/events{/number}","events_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/events","assignees_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/assignees{/user}","branches_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/branches{/branch}","tags_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/tags","blobs_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/refs{/sha}","trees_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/statuses/{sha}","languages_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/languages","stargazers_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/stargazers","contributors_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/contributors","subscribers_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/subscribers","subscription_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/subscription","commits_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/commits{/sha}","git_commits_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/git/commits{/sha}","comments_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/comments{/number}","issue_comment_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/comments{/number}","contents_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/contents/{+path}","compare_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/merges","archive_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/downloads","issues_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues{/number}","pulls_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls{/number}","milestones_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/milestones{/number}","notifications_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/labels{/name}","releases_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/releases{/id}","deployments_url":"https://api.github.com/repos/jinpark/tellmeabout.coffee/deployments","created_at":"2016-01-11T07:51:31Z","updated_at":"2016-01-23T13:23:34Z","pushed_at":"2016-01-25T03:31:13Z","git_url":"git://github.com/jinpark/tellmeabout.coffee.git","ssh_url":"git@github.com:jinpark/tellmeabout.coffee.git","clone_url":"https://github.com/jinpark/tellmeabout.coffee.git","svn_url":"https://github.com/jinpark/tellmeabout.coffee","homepage":"http://tellmeabout.coffee","size":3593,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51"},"html":{"href":"https://github.com/jinpark/tellmeabout.coffee/pull/51"},"issue":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/51"},"comments":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/jinpark/tellmeabout.coffee/statuses/00a26594c024bd21d098fe8c402fa3515fdd8ff7"}}}}