yddchsc / eastmoney Goto Github PK
View Code? Open in Web Editor NEWa crawler by scrapy of eastmoney.com
a crawler by scrapy of eastmoney.com
虽然用ghost的话ajax解决起来舒服很多, 但是用了ghost我就无法假设每次parse的负载是接近的了, 这个项目最终会应用于scrapy-redis类似的分布式架构, parse负载不均衡就要多写好些行代码做负载均衡,
所以说啊, 我想知道你是怎么做出这个决定的, 是传统方法遇到了不可逾越的困难?
比如说
class GeguyaowenPipeline(object):
def __init__(self, mongo_server, mongo_port):
#建立连接之类的
pass
@classmethod
def from_crawler(cls, crawler):
return cls.from_settings(crawler.settings)
@classmethod
def from_settings(cls, settings):
mongo_server = settings.get('MONGO_SERVER','localhost')
mongo_port = settings.get('MONGO_PORT',27017)
return cls(mongo_server,mongo_port)
参考: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
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.