old_contents: from __future__ import unicode_literals, division, absolute_import
  from builtins import *  # pylint: disable=unused-import, redefined-builtin
  
  import logging
   
  from flexget import plugin, validator
  from flexget.event import event
   
  log = logging.getLogger('cfscraper')
   
   
  class CFScraper(object):
      """
      Plugin that enables scraping of cloudflare protected sites.
  
      Example::
        cfscraper: yes
      """
   
      def validator(self):
          return validator.factory('boolean')
   
      @plugin.priority(253)
      def on_task_start(self, task, config):
          try:
              import cfscrape
          except ImportError as e:
              log.debug('Error importing cfscrape: %s' % e)
              raise plugin.DependencyError('cfscraper', 'cfscrape', 'cfscrape module required. ImportError: %s' % e)
          if config is True:
              task.requests = cfscrape.create_scraper(task.requests)
   
   
  @event('plugin.register')
  def register_plugin():
      plugin.register(CFScraper, 'cfscraper', api_ver=2)
  
new_contents: from __future__ import unicode_literals, division, absolute_import
  from builtins import *  # pylint: disable=unused-import, redefined-builtin
  
  import logging
   
  from flexget import plugin, validator
  from flexget.event import event
  from flexget.utils.requests import Session
  
   
  log = logging.getLogger('cfscraper')
  
   
  class CFScraper(object):
      """
      Plugin that enables scraping of cloudflare protected sites.
  
      Example::
        cfscraper: yes
      """
   
      def validator(self):
          return validator.factory('boolean')
   
      @plugin.priority(253)
      def on_task_start(self, task, config):
          try:
              import cfscrape
          except ImportError as e:
              log.debug('Error importing cfscrape: %s' % e)
              raise plugin.DependencyError('cfscraper', 'cfscrape', 'cfscrape module required. ImportError: %s' % e)
  
          class CFScrapeWrapper(cfscrape.CloudflareScraper, Session):
              """
              Wrapper class to strip unwanted input args from the Flexget requests class
              """
  
              def request(self, method, url, *args, **kwargs):
                  raise_status = kwargs.pop('raise_status', False)
                  resp = super(CFScrapeWrapper, self).request(method, url, *args, **kwargs)
  
                  if raise_status:
                      resp.raise_for_status()
                  return resp
  
          if config is True:
              task.requests = CFScrapeWrapper.create_scraper(task.requests)
   
   
  @event('plugin.register')
  def register_plugin():
      plugin.register(CFScraper, 'cfscraper', api_ver=2)
  
subject: extend CloudflareScraper in order to strip extraneous kwargs