(cls, crawler)
| 231 | |
| 232 | @classmethod |
| 233 | def from_crawler(cls, crawler): |
| 234 | splash_base_url = crawler.settings.get('SPLASH_URL', |
| 235 | cls.default_splash_url) |
| 236 | log_400 = crawler.settings.getbool('SPLASH_LOG_400', True) |
| 237 | slot_policy = crawler.settings.get('SPLASH_SLOT_POLICY', |
| 238 | cls.default_policy) |
| 239 | if slot_policy not in SlotPolicy._known: |
| 240 | raise NotConfigured("Incorrect slot policy: %r" % slot_policy) |
| 241 | |
| 242 | return cls(crawler, splash_base_url, slot_policy, log_400) |
| 243 | |
| 244 | def spider_opened(self, spider): |
| 245 | if not hasattr(spider, 'state'): |
nothing calls this directly
no outgoing calls
no test coverage detected