打造诗词交流平台,前期重点关注中国古诗词,后期陆续加入国外优秀诗词。
欢迎各位小伙伴支持!
Scrape poetry from gushiwen.org
如果添加上MySQL数据库创建脚本,就完美了
你好,我初次接触python,环境都是刚搭好,用户的Python3.5
在我运行view_spider 遇到如下错误,其他的author_spider fanyi_spider 都正常,麻烦能帮忙看看嘛。 万分感谢。
2016-11-04 13:59:35 [scrapy] INFO: Spider opened 2016-11-04 13:59:35 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min) 2016-11-04 13:59:35 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6025 2016-11-04 13:59:50 [scrapy] ERROR: Error caught on signal handler: <bound method RedisMixin.spider_idle of <ViewSdier 'view_spider' at 0x40a4370>> Traceback (most recent call last): File "D:\Python\lib\site-packages\scrapy\utils\signal.py", line 30, in send_catch_log *arguments, **named) File "D:\Python\lib\site-packages\pydispatch\robustapply.py", line 55, in robustApply return receiver(*arguments, **named) File "D:\Python\lib\site-packages\scrapy_redis\spiders.py", line 109, in spider_idle self.schedule_next_requests() File "D:\Python\lib\site-packages\scrapy_redis\spiders.py", line 103, in schedule_next_requests for req in self.next_requests(): File "D:\Python\lib\site-packages\scrapy_redis\spiders.py", line 84, in next_requests req = self.make_request_from_data(data) File "D:\Python\lib\site-packages\scrapy_redis\spiders.py", line 96, in make_request_from_data if '://' in data: TypeError: a bytes-like object is required, not 'str' 2016-11-04 13:59:50 [scrapy] INFO: Closing spider (finished) 2016-11-04 13:59:50 [scrapy] INFO: Dumping Scrapy stats: {'finish_reason': 'finished', 'finish_time': datetime.datetime(2016, 11, 4, 5, 59, 50, 461590), 'log_count/DEBUG': 1, 'log_count/ERROR': 1, 'log_count/INFO': 8, 'start_time': datetime.datetime(2016, 11, 4, 5, 59, 35, 450253)} 2016-11-04 13:59:50 [scrapy] INFO: Spider closed (finished)
你好,在运行在view_spider时,写入数据库之前的数据是正确的,但是写入数据库,并不能通过Navicat读出,且通过命令行是输出如下的数据:
“(u'view_18335', '\xe6\x9d\xa8\xe7\x99\xbd\xe8\x8a\xb1\xe5\x94\x90\xe4\xbb\xa3\xef\xbc\x9a\xe6\x9f\xb3\xe5\xae\x97\xe5\x85\x83\xe6\x9d\xa8\xe7\x99\xbd\xe8\x8a\xb1\xef\xbc\x8c\xe9\xa3\x8e\xe5
\x90\xb9\xe6\xb8\xa1\xe6\xb1\x9f\xe6\xb0\xb4\xe3\x80\x82\xe5\x9d\x90\xe4\xbb\xa4\xe5\xae\xab\xe6\xa0\x91\xe6\x97\xa0\xe9\xa2\x9c\xe8\x89\xb2\xef\xbc\x8c\n\xe6\x91\x87\xe8\x8d\xa1\xe6\x98\xa
5\xe5\x85\x89\xe5\x8d\x83\xe4\xb8\x87\xe9\x87\x8c\xe3\x80\x82\xe8\x8c\xab\xe8\x8c\xab\xe6\x99\x93\xe6\x97\xa5\xe4\xb8\x8b\xe9\x95\xbf\xe7\xa7\x8b\xef\xbc\x8c\xe5\x93\x80\xe6\xad\x8c\xe6\x9c
\xaa\xe6\x96\xad\xe5\x9f\x8e\xe9\xb8\xa6\xe8\xb5\xb7\xe3\x80\x82')”
请问这是什么原因?十分感谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.