How to use the scrapelib.plugins 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
- NOTE: the default for interactive mode is 'script.scrape'
          -   it will also be used in the case of single command line argument
              as it's indistinguishable from interactive mode.
        '''
        if not script:
            logger.error(
                "Cannot process input_files ({});".format(input_files) + \
                "you must specify a script file."
            )
            exit -1  # pylint: disable= pointless-statement

        global BATCH, uplugin, uplugins_loaded  # pylint: disable=global-statement,invalid-name

        BATCH = True
        if not uplugins_loaded:
            uplugin = plugins.load(logger)
            uplugins_loaded = True