MCPcopy Create free account
hub / github.com/Boris-code/feapder / test_debug

Function test_debug

tests/batch-spider/main.py:30–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 spider.start() # 采集
29
30def test_debug():
31 spider = test_spider.TestSpider.to_DebugBatchSpider(
32 task_id=1,
33 redis_key="feapder:test_batch_spider", # 分布式爬虫调度信息存储位置
34 task_table="batch_spider_task", # mysql中的任务表
35 task_keys=["id", "url"], # 需要获取任务表里的字段名,可添加多个
36 task_state="state", # mysql中任务状态字段
37 batch_record_table="batch_spider_batch_record", # mysql中的批次记录表
38 batch_name="批次爬虫测试(周全)", # 批次名字
39 batch_interval=7, # 批次周期 天为单位 若为小时 可写 1 / 24
40 )
41
42
43 spider.start() # 采集
44
45
46if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

to_DebugBatchSpiderMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected