scrapy_dynamic_spiders/factories/crawl_spider_factory.py
def construct_spider(self, spidercls) -> type:
        """
        Generates a temporary spider class based off of a provided temporary class and the factory's attributes

        :param spidercls: The CrawlSpider class or a CrawlSpider subclass
        :return: A Spider-derived class object
        """
        if not spidercls:
            raise AttributeError('Cannot construct a Spider without a template class.')

        self._count += 1

        settings = self._construct_custom_settings(spidercls)
        rules = self._construct_rule_list(spidercls)
        class_vars = {
            'custom_settings': settings,
            'rules': rules
        }
        return type(f'{spidercls.__name__}-{self._count}', (spidercls,), class_vars)

        Generates a temporary spider class based off of a provided temporary class and the factory's attributes

        :param spidercls: The CrawlSpider class or a CrawlSpider subclass
        :return: A Spider-derived class object
        
Generates a temporary spider class based off of a provided temporary class and the factory's attributes
Generates a temporary spider class based off of a provided temporary class and the factory ' s attributes
def construct_spider(self, spidercls) -> type:
        if not spidercls:
            raise AttributeError('Cannot construct a Spider without a template class.')
        self._count += 1
        settings = self._construct_custom_settings(spidercls)
        rules = self._construct_rule_list(spidercls)
        class_vars = {
            'custom_settings': settings,
            'rules': rules
        }
        return type(f'{spidercls.__name__}-{self._count}', (spidercls,), class_vars)
def construct_spider ( self , spidercls ) -> type : if not spidercls : raise AttributeError ( 'Cannot construct a Spider without a template class.' ) self . _count += 1 settings = self . _construct_custom_settings ( spidercls ) rules = self . _construct_rule_list ( spidercls ) class_vars = { 'custom_settings' : settings , 'rules' : rules } return type ( f'{spidercls.__name__}-{self._count}' , ( spidercls , ) , class_vars )
Generates a temporary spider class based off of a provided temporary class and the factory's attributes
Generates a temporary spider class based off of a provided temporary class and the factory ' s attributes
"""
        Generates a temporary spider class based off of a provided temporary class and the factory's attributes

        :param spidercls: The CrawlSpider class or a CrawlSpider subclass
        :return: A Spider-derived class object
        """
A Spider-derived class object
A Spider - derived class object
self
spidercls
The CrawlSpider class or a CrawlSpider subclass
The CrawlSpider class or a CrawlSpider subclass