ignition.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:tobber 作者: fchamicapereira 项目源码 文件源码
def __init__(self):

        # getting the settings of the project (settings.py)
        self.settings = get_project_settings()

        # processing input arguments
        self.process_args()

        # meeting the arguments with the settings
        self.change_settings()

        # open mongo here just to check if mongod service is running
        # if it isn't, might as well not start crawling
        if self.args.file == None:
            self.open_mongo()
            self.dump_collection()

        # running the spiders
        self.run_crawler()

        if self.args.file:
            self.sort_file()

        else:

            if self.args.server == False:

                # working with the mongo db
                self.sort()

            # close mongo
            self.close_mongo()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号