输入的是 http://www.jwc.shu.edu.cn/Default.aspx?tabid=23168&ctl=Detail&mid=43516&Id=231393
但是却get到的是 http://www.jwc.shu.edu.cn/Default.aspx?tabid=23168
log里也没有写转向标志
E:\Amo\SHUSpider>scrapy shell http://www.jwc.shu.edu.cn/Default.aspx?tabid=23168&ctl=Detail&mid=43516&Id=231393
2018-08-06 17:25:24 [scrapy.utils.log] INFO: Scrapy 1.5.0 started (bot: SHUSpider)
2018-08-06 17:25:24 [scrapy.utils.log] INFO: Versions: lxml 4.2.1.0, libxml2 2.9.8, cssselect 1.0.3, parsel 1.4.0, w3lib 1.
19.0, Twisted 17.5.0, Python 3.6.5 |Anaconda custom (64-bit)| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)],
pyOpenSSL 18.0.0 (OpenSSL 1.0.2o 27 Mar 2018), cryptography 2.2.2, Platform Windows-10-10.0.16299-SP0
2018-08-06 17:25:24 [scrapy.crawler] INFO: Overridden settings: {'BOT_NAME': 'SHUSpider', 'DUPEFILTER_CLASS': 'scrapy.dupef
ilters.BaseDupeFilter', 'LOGSTATS_INTERVAL': 0, 'NEWSPIDER_MODULE': 'SHUSpider.spiders', 'SPIDER_MODULES': ['SHUSpider.spid
ers']}
2018-08-06 17:25:24 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.telnet.TelnetConsole']
2018-08-06 17:25:24 [scrapy.middleware] INFO: Enabled downloader middlewares:
['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']
2018-08-06 17:25:24 [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']
2018-08-06 17:25:24 [scrapy.middleware] INFO: Enabled item pipelines:
['SHUSpider.pipelines.ShuspiderPipeline',
'SHUSpider.pipelines.MysqlTwistedPipeline']
2018-08-06 17:25:24 [scrapy.extensions.telnet] DEBUG: Telnet console listening on 127.0.0.1:6023
2018-08-06 17:25:24 [scrapy.core.engine] INFO: Spider opened
2018-08-06
17:25:25 [scrapy.core.engine] DEBUG: Crawled (200) <GET
http://www.jwc.shu.edu.cn/Default.aspx?tabid=23168> (ref
erer: None)
[s] Available Scrapy objects:
[s] scrapy scrapy module (contains scrapy.Request, scrapy.Selector, etc)
[s] crawler <scrapy.crawler.Crawler object at 0x0000021A3460AC18>
[s] item {}
[s] request <GET http://www.jwc.shu.edu.cn/Default.aspx?tabid=23168>
[s] response <200 http://www.jwc.shu.edu.cn/Default.aspx?tabid=23168>
[s] settings <scrapy.settings.Settings object at 0x0000021A36DB0898>
[s] spider <JwcSpider 'jwc' at 0x21a37139470>
带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎
了解课程