작성
·
296
0
안녕하세요
윈도우10 cmd 으로 사용중입니다
scrapy shell 'http://corners.gmarket.co.kr/Bestsellers'
이렇게 하니까 아래와 같은 오류가 나옵니다
ecommerce폴더 안에 ecommerce폴더 안에서 실행한겁니다
문과라서 이런 오류 나오면 당황스럽네요 ㅠㅠ
2020-05-05 17:44:17 [scrapy.utils.log] INFO: Scrapy 2.1.0 started (bot: ecommerce)
2020-05-05 17:44:17 [scrapy.utils.log] INFO: Versions: lxml 4.5.0.0, libxml2 2.9.5, cssselect 1.1.0, parsel 1.5.2, w3lib 1.21.0, Twisted 20.3.0, Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)], pyOpenSSL 19.1.0 (OpenSSL 1.1.1g 21 Apr 2020), cryptography 2.9.2, Platform Windows-10-10.0.18362-SP0
2020-05-05 17:44:17 [scrapy.utils.log] DEBUG: Using reactor: twisted.internet.selectreactor.SelectReactor
2020-05-05 17:44:17 [scrapy.crawler] INFO: Overridden settings:
{'BOT_NAME': 'ecommerce',
'DUPEFILTER_CLASS': 'scrapy.dupefilters.BaseDupeFilter',
'LOGSTATS_INTERVAL': 0,
'NEWSPIDER_MODULE': 'ecommerce.spiders',
'ROBOTSTXT_OBEY': True,
'SPIDER_MODULES': ['ecommerce.spiders']}
2020-05-05 17:44:17 [scrapy.extensions.telnet] INFO: Telnet Password: 1cdc2161cb05e638
2020-05-05 17:44:17 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.telnet.TelnetConsole']
2020-05-05 17:44:18 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.robotstxt.RobotsTxtMiddleware',
'scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.retry.RetryMiddleware',
'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',
'scrapy.downloadermiddlewares.stats.DownloaderStats']
2020-05-05 17:44:18 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
'scrapy.spidermiddlewares.referer.RefererMiddleware',
'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
'scrapy.spidermiddlewares.depth.DepthMiddleware']
2020-05-05 17:44:18 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2020-05-05 17:44:18 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2020-05-05 17:44:18 [scrapy.core.engine] INFO: Spider opened
2020-05-05 17:44:18 [scrapy.downloadermiddlewares.robotstxt] ERROR: Error downloading <GET http://'http/robots.txt>: invalid hostname: 'http
Traceback (most recent call last):
File "c:\python38\lib\site-packages\scrapy\core\downloader\middleware.py", line 44, in process_request
return (yield download_func(request=request, spider=spider))
ValueError: invalid hostname: 'http
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\scrapy.exe\__main__.py", line 7, in <module>
File "c:\python38\lib\site-packages\scrapy\cmdline.py", line 143, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "c:\python38\lib\site-packages\scrapy\cmdline.py", line 98, in _run_print_help
func(*a, **kw)
File "c:\python38\lib\site-packages\scrapy\cmdline.py", line 151, in _run_command
cmd.run(args, opts)
File "c:\python38\lib\site-packages\scrapy\commands\shell.py", line 74, in run
shell.start(url=url, redirect=not opts.no_redirect)
File "c:\python38\lib\site-packages\scrapy\shell.py", line 45, in start
self.fetch(url, spider, redirect=redirect)
File "c:\python38\lib\site-packages\scrapy\shell.py", line 112, in fetch
response, spider = threads.blockingCallFromThread(
File "c:\python38\lib\site-packages\twisted\internet\threads.py", line 122, in blockingCallFromThread
result.raiseException()
File "c:\python38\lib\site-packages\twisted\python\failure.py", line 488, in raiseException
raise self.value.with_traceback(self.tb)
ValueError: invalid hostname: 'http
오류 문구가 여기까지 입니다
답변 2
0
0
scrapy shell "http://corners.gmarket.co.kr/Bestsellers"
자문자답이네요 ㅎㅎ; 쌍따옴표로 해결이 되었습니다
저 같은 분들을 위해 지우지 않고 남겨둘게요