@classmethod<EOL><INDENT>def create_scraper(cls, sess=None, **kwargs):<DEDENT>
scraper = cls(**kwargs)<EOL>if sess:<EOL><INDENT>attrs = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT:data>"]<EOL>for attr in attrs:<EOL><INDENT>val = getattr(sess, attr, None)<EOL>if val:<EOL><INDENT>setattr(scraper, attr, val)<EOL><DEDENT><DEDENT><DEDENT>return scraper<EOL>
Convenience function for creating a ready-to-go CloudflareScraper object.