{"action":"created","issue":{"url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/issues/6","repository_url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler","labels_url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/issues/6/comments","events_url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/issues/6/events","html_url":"https://github.com/zhegexiaohuozi/SeimiCrawler/pull/6","id":167006695,"number":6,"title":"启动的时候只加载指定爬虫","user":{"login":"xiaoyao2102","id":12893323,"avatar_url":"https://avatars.githubusercontent.com/u/12893323?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaoyao2102","html_url":"https://github.com/xiaoyao2102","followers_url":"https://api.github.com/users/xiaoyao2102/followers","following_url":"https://api.github.com/users/xiaoyao2102/following{/other_user}","gists_url":"https://api.github.com/users/xiaoyao2102/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaoyao2102/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaoyao2102/subscriptions","organizations_url":"https://api.github.com/users/xiaoyao2102/orgs","repos_url":"https://api.github.com/users/xiaoyao2102/repos","events_url":"https://api.github.com/users/xiaoyao2102/events{/privacy}","received_events_url":"https://api.github.com/users/xiaoyao2102/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/labels/unnecessary","name":"unnecessary","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-22T09:32:36Z","updated_at":"2016-07-23T10:30:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/pulls/6","html_url":"https://github.com/zhegexiaohuozi/SeimiCrawler/pull/6","diff_url":"https://github.com/zhegexiaohuozi/SeimiCrawler/pull/6.diff","patch_url":"https://github.com/zhegexiaohuozi/SeimiCrawler/pull/6.patch"},"body":"之前的做法是扫描crawlers包下面所有爬虫加载到context中，但是有些并不想加载的爬虫会对环境造成影响。\r\n\r\n比如一个爬虫指定redis作为queue而另一个用defaultqueue，如果只启动第二爬虫的话，在没有redis环境下也会报出could not get resource from the pool。\r\n\r\n现在把Seimi及SeimiContext的构造器改为有参构造，这样可以在注册类的时候屏蔽掉那些不想启动的爬虫。"},"comment":{"url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/issues/comments/234711386","html_url":"https://github.com/zhegexiaohuozi/SeimiCrawler/pull/6#issuecomment-234711386","issue_url":"https://api.github.com/repos/zhegexiaohuozi/SeimiCrawler/issues/6","id":234711386,"user":{"login":"xiaoyao2102","id":12893323,"avatar_url":"https://avatars.githubusercontent.com/u/12893323?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaoyao2102","html_url":"https://github.com/xiaoyao2102","followers_url":"https://api.github.com/users/xiaoyao2102/followers","following_url":"https://api.github.com/users/xiaoyao2102/following{/other_user}","gists_url":"https://api.github.com/users/xiaoyao2102/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaoyao2102/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaoyao2102/subscriptions","organizations_url":"https://api.github.com/users/xiaoyao2102/orgs","repos_url":"https://api.github.com/users/xiaoyao2102/repos","events_url":"https://api.github.com/users/xiaoyao2102/events{/privacy}","received_events_url":"https://api.github.com/users/xiaoyao2102/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T10:30:05Z","updated_at":"2016-07-23T10:30:05Z","body":"嗯，的确有道理，感谢作者解释：)\r\n\r\n应该还是我这里需求比较少见。我这里会需要同时运行多个爬虫，并且可以随时各自启动和停止（有时候系统资源紧张需要停掉一些优先级低的爬虫），所以最好的情况应该是在不重新打包的情况下，用命令行参数来选择需要启动的爬虫。\r\n"}}
{"actor":{"display_login":"xiaoyao2102"}}