{"action":"created","issue":{"url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers/issues/2","repository_url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers","labels_url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers/issues/2/comments","events_url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers/issues/2/events","html_url":"https://github.com/TaiwanStat/Taiwan-news-crawlers/issues/2","id":302951886,"number":2,"title":"crawl apple/appleRealtime fail","user":{"login":"elleryq","id":22297,"avatar_url":"https://avatars0.githubusercontent.com/u/22297?v=4","gravatar_id":"","url":"https://api.github.com/users/elleryq","html_url":"https://github.com/elleryq","followers_url":"https://api.github.com/users/elleryq/followers","following_url":"https://api.github.com/users/elleryq/following{/other_user}","gists_url":"https://api.github.com/users/elleryq/gists{/gist_id}","starred_url":"https://api.github.com/users/elleryq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elleryq/subscriptions","organizations_url":"https://api.github.com/users/elleryq/orgs","repos_url":"https://api.github.com/users/elleryq/repos","events_url":"https://api.github.com/users/elleryq/events{/privacy}","received_events_url":"https://api.github.com/users/elleryq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-07T03:27:57Z","updated_at":"2018-03-07T04:39:10Z","closed_at":null,"author_association":"NONE","body":"依照 README 操作，出現 `TypeError: 'float' object is not iterable` 錯誤。\r\n\r\n```\r\nscrapy crawl apple -o apple_news.json\r\n2018-03-07 11:25:33 [scrapy.utils.log] INFO: Scrapy 1.3.0 started (bot: TaiwanNewsCrawler)\r\n2018-03-07 11:25:33 [scrapy.utils.log] INFO: Overridden settings: {'SPIDER_MODULES': ['TaiwanNewsCrawler.spiders'], 'FEED_FORMAT': 'json', 'FEED_URI': 'apple_news.json', 'BOT_NAME': 'TaiwanNewsCrawler', 'NEWSPIDER_MODULE': 'TaiwanNewsCrawler.spiders'}\r\n2018-03-07 11:25:33 [scrapy.middleware] INFO: Enabled extensions:\r\n['scrapy.extensions.feedexport.FeedExporter',\r\n 'scrapy.extensions.telnet.TelnetConsole',\r\n 'scrapy.extensions.corestats.CoreStats',\r\n 'scrapy.extensions.logstats.LogStats']\r\n2018-03-07 11:25:33 [scrapy.middleware] INFO: Enabled downloader middlewares:\r\n['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',\r\n 'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',\r\n 'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',\r\n 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',\r\n 'scrapy.downloadermiddlewares.retry.RetryMiddleware',\r\n 'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',\r\n 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',\r\n 'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',\r\n 'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',\r\n 'scrapy.downloadermiddlewares.stats.DownloaderStats']\r\n2018-03-07 11:25:33 [scrapy.middleware] INFO: Enabled spider middlewares:\r\n['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',\r\n 'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',\r\n 'scrapy.spidermiddlewares.referer.RefererMiddleware',\r\n 'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',\r\n 'scrapy.spidermiddlewares.depth.DepthMiddleware']\r\n2018-03-07 11:25:33 [scrapy.middleware] INFO: Enabled item pipelines:\r\n[]\r\n2018-03-07 11:25:33 [scrapy.core.engine] INFO: Spider opened\r\n2018-03-07 11:25:33 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)\r\n2018-03-07 11:25:33 [scrapy.extensions.telnet] DEBUG: Telnet console listening on 127.0.0.1:6023\r\n2018-03-07 11:25:33 [scrapy.core.scraper] ERROR: Error downloading <GET https://tw.appledaily.com/daily>\r\nTraceback (most recent call last):\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/internet/defer.py\", line 1384, in _inlineCallbacks\r\n    result = result.throwExceptionIntoGenerator(g)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/python/failure.py\", line 408, in throwExceptionIntoGenerator\r\n    return g.throw(self.type, self.value, self.tb)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/scrapy/core/downloader/middleware.py\", line 43, in process_request\r\n    defer.returnValue((yield download_func(request=request,spider=spider)))\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/scrapy/utils/defer.py\", line 45, in mustbe_deferred\r\n    result = f(*args, **kw)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/scrapy/core/downloader/handlers/__init__.py\", line 65, in download_request\r\n    return handler.download_request(request, spider)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/scrapy/core/downloader/handlers/http11.py\", line 61, in download_request\r\n    return agent.download_request(request)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/scrapy/core/downloader/handlers/http11.py\", line 286, in download_request\r\n    method, to_bytes(url, encoding='ascii'), headers, bodyproducer)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/web/client.py\", line 1655, in request\r\n    parsedURI.originForm)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/web/client.py\", line 1432, in _requestWithEndpoint\r\n    d = self._pool.getConnection(key, endpoint)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/web/client.py\", line 1318, in getConnection\r\n    return self._newConnection(key, endpoint)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/web/client.py\", line 1330, in _newConnection\r\n    return endpoint.connect(factory)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/internet/endpoints.py\", line 2092, in connect\r\n    self._wrapperFactory(protocolFactory)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/internet/endpoints.py\", line 903, in connect\r\n    EndpointReceiver, self._hostText, portNumber=self._port\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/internet/_resolver.py\", line 189, in resolveHostName\r\n    onAddress = self._simpleResolver.getHostByName(hostName)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/scrapy/resolver.py\", line 21, in getHostByName\r\n    d = super(CachingThreadedResolver, self).getHostByName(name, timeout)\r\n  File \"/home/ellery/.virtualenvs/taiwan-news-crawlers/lib/python3.4/site-packages/twisted/internet/base.py\", line 276, in getHostByName\r\n    timeoutDelay = sum(timeout)\r\nTypeError: 'float' object is not iterable\r\n2018-03-07 11:25:33 [scrapy.core.engine] INFO: Closing spider (finished)\r\n2018-03-07 11:25:33 [scrapy.statscollectors] INFO: Dumping Scrapy stats:\r\n{'downloader/exception_count': 1,\r\n 'downloader/exception_type_count/builtins.TypeError': 1,\r\n 'downloader/request_bytes': 220,\r\n 'downloader/request_count': 1,\r\n 'downloader/request_method_count/GET': 1,\r\n 'finish_reason': 'finished',\r\n 'finish_time': datetime.datetime(2018, 3, 7, 3, 25, 33, 521731),\r\n 'log_count/DEBUG': 1,\r\n 'log_count/ERROR': 1,\r\n 'log_count/INFO': 7,\r\n 'scheduler/dequeued': 1,\r\n 'scheduler/dequeued/memory': 1,\r\n 'scheduler/enqueued': 1,\r\n 'scheduler/enqueued/memory': 1,\r\n 'start_time': datetime.datetime(2018, 3, 7, 3, 25, 33, 203939)}\r\n2018-03-07 11:25:33 [scrapy.core.engine] INFO: Spider closed (finished)\r\n```"},"comment":{"url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers/issues/comments/371020503","html_url":"https://github.com/TaiwanStat/Taiwan-news-crawlers/issues/2#issuecomment-371020503","issue_url":"https://api.github.com/repos/TaiwanStat/Taiwan-news-crawlers/issues/2","id":371020503,"user":{"login":"elleryq","id":22297,"avatar_url":"https://avatars0.githubusercontent.com/u/22297?v=4","gravatar_id":"","url":"https://api.github.com/users/elleryq","html_url":"https://github.com/elleryq","followers_url":"https://api.github.com/users/elleryq/followers","following_url":"https://api.github.com/users/elleryq/following{/other_user}","gists_url":"https://api.github.com/users/elleryq/gists{/gist_id}","starred_url":"https://api.github.com/users/elleryq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elleryq/subscriptions","organizations_url":"https://api.github.com/users/elleryq/orgs","repos_url":"https://api.github.com/users/elleryq/repos","events_url":"https://api.github.com/users/elleryq/events{/privacy}","received_events_url":"https://api.github.com/users/elleryq/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T04:39:09Z","updated_at":"2018-03-07T04:39:09Z","author_association":"NONE","body":"好的!我試試看 :)"}}
{"actor":{"display_login":"elleryq"}}