{"action":"created","comment":{"url":"https://api.github.com/repos/delftswa2017/scrapy/pulls/comments/106535871","pull_request_review_id":27463830,"id":106535871,"diff_hunk":"@@ -6,51 +6,8 @@\n # http://doc.scrapy.org/en/latest/topics/spider-middleware.html\n \n from scrapy import signals\n+from scrapy.spidermiddlewares import SpiderMiddleware\n \n \n-class ${ProjectName}SpiderMiddleware(object):\n-    # Not all methods need to be defined. If a method is not defined,\n-    # scrapy acts as if the spider middleware does not modify the\n-    # passed objects.\n-\n-    @classmethod\n-    def from_crawler(cls, crawler):\n-        # This method is used by Scrapy to create your spiders.\n-        s = cls()\n-        crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\n-        return s\n-\n-    def process_spider_input(self, response, spider):\n-        # Called for each response that goes through the spider\n-        # middleware and into the spider.\n-\n-        # Should return None or raise an exception.\n-        return None\n-\n-    def process_spider_output(self, response, result, spider):\n-        # Called with the results returned from the Spider, after\n-        # it has processed the response.\n-\n-        # Must return an iterable of Request, dict or Item objects.\n-        for i in result:","path":"scrapy/templates/project/module/middlewares.py.tmpl","position":31,"original_position":31,"commit_id":"67e1a1e051f099a0d2fe98e17e9185a2a4017adc","original_commit_id":"67e1a1e051f099a0d2fe98e17e9185a2a4017adc","user":{"login":"jojona","id":5450692,"avatar_url":"https://avatars1.githubusercontent.com/u/5450692?v=3","gravatar_id":"","url":"https://api.github.com/users/jojona","html_url":"https://github.com/jojona","followers_url":"https://api.github.com/users/jojona/followers","following_url":"https://api.github.com/users/jojona/following{/other_user}","gists_url":"https://api.github.com/users/jojona/gists{/gist_id}","starred_url":"https://api.github.com/users/jojona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojona/subscriptions","organizations_url":"https://api.github.com/users/jojona/orgs","repos_url":"https://api.github.com/users/jojona/repos","events_url":"https://api.github.com/users/jojona/events{/privacy}","received_events_url":"https://api.github.com/users/jojona/received_events","type":"User","site_admin":false},"body":"This might be good to show the users examples on how to use the function. Same below.","created_at":"2017-03-16T21:27:35Z","updated_at":"2017-03-16T21:28:02Z","html_url":"https://github.com/delftswa2017/scrapy/pull/8#discussion_r106535871","pull_request_url":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/delftswa2017/scrapy/pulls/comments/106535871"},"html":{"href":"https://github.com/delftswa2017/scrapy/pull/8#discussion_r106535871"},"pull_request":{"href":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8","id":110478142,"html_url":"https://github.com/delftswa2017/scrapy/pull/8","diff_url":"https://github.com/delftswa2017/scrapy/pull/8.diff","patch_url":"https://github.com/delftswa2017/scrapy/pull/8.patch","issue_url":"https://api.github.com/repos/delftswa2017/scrapy/issues/8","number":8,"state":"open","locked":false,"title":"Base class for spider middleware","user":{"login":"jorenham","id":6208662,"avatar_url":"https://avatars0.githubusercontent.com/u/6208662?v=3","gravatar_id":"","url":"https://api.github.com/users/jorenham","html_url":"https://github.com/jorenham","followers_url":"https://api.github.com/users/jorenham/followers","following_url":"https://api.github.com/users/jorenham/following{/other_user}","gists_url":"https://api.github.com/users/jorenham/gists{/gist_id}","starred_url":"https://api.github.com/users/jorenham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorenham/subscriptions","organizations_url":"https://api.github.com/users/jorenham/orgs","repos_url":"https://api.github.com/users/jorenham/repos","events_url":"https://api.github.com/users/jorenham/events{/privacy}","received_events_url":"https://api.github.com/users/jorenham/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-13T19:18:14Z","updated_at":"2017-03-16T21:28:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08bd9ca515b83a6b1544cf0d6fa8517b3f6f0fc6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8/commits","review_comments_url":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8/comments","review_comment_url":"https://api.github.com/repos/delftswa2017/scrapy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/delftswa2017/scrapy/issues/8/comments","statuses_url":"https://api.github.com/repos/delftswa2017/scrapy/statuses/67e1a1e051f099a0d2fe98e17e9185a2a4017adc","head":{"label":"delftswa2017:baseclass-spider-middleware","ref":"baseclass-spider-middleware","sha":"67e1a1e051f099a0d2fe98e17e9185a2a4017adc","user":{"login":"delftswa2017","id":24945322,"avatar_url":"https://avatars2.githubusercontent.com/u/24945322?v=3","gravatar_id":"","url":"https://api.github.com/users/delftswa2017","html_url":"https://github.com/delftswa2017","followers_url":"https://api.github.com/users/delftswa2017/followers","following_url":"https://api.github.com/users/delftswa2017/following{/other_user}","gists_url":"https://api.github.com/users/delftswa2017/gists{/gist_id}","starred_url":"https://api.github.com/users/delftswa2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delftswa2017/subscriptions","organizations_url":"https://api.github.com/users/delftswa2017/orgs","repos_url":"https://api.github.com/users/delftswa2017/repos","events_url":"https://api.github.com/users/delftswa2017/events{/privacy}","received_events_url":"https://api.github.com/users/delftswa2017/received_events","type":"Organization","site_admin":false},"repo":{"id":82099545,"name":"scrapy","full_name":"delftswa2017/scrapy","owner":{"login":"delftswa2017","id":24945322,"avatar_url":"https://avatars2.githubusercontent.com/u/24945322?v=3","gravatar_id":"","url":"https://api.github.com/users/delftswa2017","html_url":"https://github.com/delftswa2017","followers_url":"https://api.github.com/users/delftswa2017/followers","following_url":"https://api.github.com/users/delftswa2017/following{/other_user}","gists_url":"https://api.github.com/users/delftswa2017/gists{/gist_id}","starred_url":"https://api.github.com/users/delftswa2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delftswa2017/subscriptions","organizations_url":"https://api.github.com/users/delftswa2017/orgs","repos_url":"https://api.github.com/users/delftswa2017/repos","events_url":"https://api.github.com/users/delftswa2017/events{/privacy}","received_events_url":"https://api.github.com/users/delftswa2017/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/delftswa2017/scrapy","description":"Scrapy, a fast high-level web crawling & scraping framework for Python.","fork":true,"url":"https://api.github.com/repos/delftswa2017/scrapy","forks_url":"https://api.github.com/repos/delftswa2017/scrapy/forks","keys_url":"https://api.github.com/repos/delftswa2017/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/delftswa2017/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/delftswa2017/scrapy/teams","hooks_url":"https://api.github.com/repos/delftswa2017/scrapy/hooks","issue_events_url":"https://api.github.com/repos/delftswa2017/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/delftswa2017/scrapy/events","assignees_url":"https://api.github.com/repos/delftswa2017/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/delftswa2017/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/delftswa2017/scrapy/tags","blobs_url":"https://api.github.com/repos/delftswa2017/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/delftswa2017/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/delftswa2017/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/delftswa2017/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/delftswa2017/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/delftswa2017/scrapy/languages","stargazers_url":"https://api.github.com/repos/delftswa2017/scrapy/stargazers","contributors_url":"https://api.github.com/repos/delftswa2017/scrapy/contributors","subscribers_url":"https://api.github.com/repos/delftswa2017/scrapy/subscribers","subscription_url":"https://api.github.com/repos/delftswa2017/scrapy/subscription","commits_url":"https://api.github.com/repos/delftswa2017/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/delftswa2017/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/delftswa2017/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/delftswa2017/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/delftswa2017/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/delftswa2017/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/delftswa2017/scrapy/merges","archive_url":"https://api.github.com/repos/delftswa2017/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/delftswa2017/scrapy/downloads","issues_url":"https://api.github.com/repos/delftswa2017/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/delftswa2017/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/delftswa2017/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/delftswa2017/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/delftswa2017/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/delftswa2017/scrapy/releases{/id}","deployments_url":"https://api.github.com/repos/delftswa2017/scrapy/deployments","created_at":"2017-02-15T19:44:46Z","updated_at":"2017-02-15T19:44:51Z","pushed_at":"2017-03-16T21:08:05Z","git_url":"git://github.com/delftswa2017/scrapy.git","ssh_url":"git@github.com:delftswa2017/scrapy.git","clone_url":"https://github.com/delftswa2017/scrapy.git","svn_url":"https://github.com/delftswa2017/scrapy","homepage":"http://scrapy.org","size":15444,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"delftswa2017:master","ref":"master","sha":"cfb56400b29316a43208053a8ef6d48eb0eb499e","user":{"login":"delftswa2017","id":24945322,"avatar_url":"https://avatars2.githubusercontent.com/u/24945322?v=3","gravatar_id":"","url":"https://api.github.com/users/delftswa2017","html_url":"https://github.com/delftswa2017","followers_url":"https://api.github.com/users/delftswa2017/followers","following_url":"https://api.github.com/users/delftswa2017/following{/other_user}","gists_url":"https://api.github.com/users/delftswa2017/gists{/gist_id}","starred_url":"https://api.github.com/users/delftswa2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delftswa2017/subscriptions","organizations_url":"https://api.github.com/users/delftswa2017/orgs","repos_url":"https://api.github.com/users/delftswa2017/repos","events_url":"https://api.github.com/users/delftswa2017/events{/privacy}","received_events_url":"https://api.github.com/users/delftswa2017/received_events","type":"Organization","site_admin":false},"repo":{"id":82099545,"name":"scrapy","full_name":"delftswa2017/scrapy","owner":{"login":"delftswa2017","id":24945322,"avatar_url":"https://avatars2.githubusercontent.com/u/24945322?v=3","gravatar_id":"","url":"https://api.github.com/users/delftswa2017","html_url":"https://github.com/delftswa2017","followers_url":"https://api.github.com/users/delftswa2017/followers","following_url":"https://api.github.com/users/delftswa2017/following{/other_user}","gists_url":"https://api.github.com/users/delftswa2017/gists{/gist_id}","starred_url":"https://api.github.com/users/delftswa2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delftswa2017/subscriptions","organizations_url":"https://api.github.com/users/delftswa2017/orgs","repos_url":"https://api.github.com/users/delftswa2017/repos","events_url":"https://api.github.com/users/delftswa2017/events{/privacy}","received_events_url":"https://api.github.com/users/delftswa2017/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/delftswa2017/scrapy","description":"Scrapy, a fast high-level web crawling & scraping framework for Python.","fork":true,"url":"https://api.github.com/repos/delftswa2017/scrapy","forks_url":"https://api.github.com/repos/delftswa2017/scrapy/forks","keys_url":"https://api.github.com/repos/delftswa2017/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/delftswa2017/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/delftswa2017/scrapy/teams","hooks_url":"https://api.github.com/repos/delftswa2017/scrapy/hooks","issue_events_url":"https://api.github.com/repos/delftswa2017/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/delftswa2017/scrapy/events","assignees_url":"https://api.github.com/repos/delftswa2017/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/delftswa2017/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/delftswa2017/scrapy/tags","blobs_url":"https://api.github.com/repos/delftswa2017/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/delftswa2017/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/delftswa2017/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/delftswa2017/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/delftswa2017/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/delftswa2017/scrapy/languages","stargazers_url":"https://api.github.com/repos/delftswa2017/scrapy/stargazers","contributors_url":"https://api.github.com/repos/delftswa2017/scrapy/contributors","subscribers_url":"https://api.github.com/repos/delftswa2017/scrapy/subscribers","subscription_url":"https://api.github.com/repos/delftswa2017/scrapy/subscription","commits_url":"https://api.github.com/repos/delftswa2017/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/delftswa2017/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/delftswa2017/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/delftswa2017/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/delftswa2017/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/delftswa2017/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/delftswa2017/scrapy/merges","archive_url":"https://api.github.com/repos/delftswa2017/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/delftswa2017/scrapy/downloads","issues_url":"https://api.github.com/repos/delftswa2017/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/delftswa2017/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/delftswa2017/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/delftswa2017/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/delftswa2017/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/delftswa2017/scrapy/releases{/id}","deployments_url":"https://api.github.com/repos/delftswa2017/scrapy/deployments","created_at":"2017-02-15T19:44:46Z","updated_at":"2017-02-15T19:44:51Z","pushed_at":"2017-03-16T21:08:05Z","git_url":"git://github.com/delftswa2017/scrapy.git","ssh_url":"git@github.com:delftswa2017/scrapy.git","clone_url":"https://github.com/delftswa2017/scrapy.git","svn_url":"https://github.com/delftswa2017/scrapy","homepage":"http://scrapy.org","size":15444,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8"},"html":{"href":"https://github.com/delftswa2017/scrapy/pull/8"},"issue":{"href":"https://api.github.com/repos/delftswa2017/scrapy/issues/8"},"comments":{"href":"https://api.github.com/repos/delftswa2017/scrapy/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/delftswa2017/scrapy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/delftswa2017/scrapy/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/delftswa2017/scrapy/statuses/67e1a1e051f099a0d2fe98e17e9185a2a4017adc"}}}}
{"actor":{"display_login":"jojona"}}