How to use the scrapelib.plugins.load function in scrapelib

To help you get started, we’ve selected a few scrapelib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yarko / scrape / scrape.py View on Github external
def preloop(self):  # add params, as you need...
        # for development:
        # fn = jco
        # fn = jama  # online
        # self.doc = open_tree(fn)
        # self.root = self.doc.getroottree()
        # self.node = self.doc
        # TODO:  get / log history to a user file;
        global BATCH, uplugin, uplugins_loaded  # pylint: disable=global-statement, invalid-name

        BATCH = False
        if not uplugins_loaded:
            uplugin = plugins.load(logger)
            uplugins_loaded = True
        self.history = History()
        ##  I think I prefer to not do this by default: