MCPcopy
hub / github.com/scrapy/scrapy / crawl

Method crawl

tests/test_command_crawl.py:14–20  ·  view source on GitHub ↗
(
        self, code: str, proj_path: Path, args: Iterable[str] = ()
    )

Source from the content-addressed store, hash-verified

12
13class TestCrawlCommand(TestProjectBase):
14 def crawl(
15 self, code: str, proj_path: Path, args: Iterable[str] = ()
16 ) -> tuple[int, str, str]:
17 (proj_path / self.project_name / "spiders" / "myspider.py").write_text(
18 code, encoding="utf-8"
19 )
20 return proc("crawl", "myspider", *args, cwd=proj_path)
21
22 def get_log(self, code: str, proj_path: Path, args: Iterable[str] = ()) -> str:
23 _, _, stderr = self.crawl(code, proj_path, args=args)

Calls 1

procFunction · 0.90

Tested by

no test coverage detected