MCPcopy
hub / github.com/0x727/ShuiZe_0x727 / saveSpider

Method saveSpider

Plugins/saveToExcel.py:57–75  ·  view source on GitHub ↗
(self, spiderName, links)

Source from the content-addressed store, hash-verified

55
56 # 保存爬虫结果
57 def saveSpider(self, spiderName, links): # spiderName是搜索引擎的名字,例如百度和必应
58 if self.Sheet_line == 1:
59 self.sheet.cell(self.Sheet_line, 1).value = '爬虫'
60 self.sheet.cell(self.Sheet_line, 2).value = '关键字'
61 self.sheet.cell(self.Sheet_line, 3).value = '链接'
62 self.sheet.cell(self.Sheet_line, 4).value = '标题'
63 self.Sheet_line += 1
64
65 for _ in links:
66 each_wd, link, title = _
67 self.sheet.cell(self.Sheet_line, 1).value = spiderName
68 self.sheet.cell(self.Sheet_line, 2).value = each_wd
69 self.sheet.cell(self.Sheet_line, 3).value = link
70 try:
71 self.sheet.cell(self.Sheet_line, 4).value = title
72 except Exception as e:
73 self.sheet.cell(self.Sheet_line, 4).value = ''
74 self.Sheet_line += 1
75 self.excel.save(self.excelSavePath)
76
77 # 保存证书结果
78 def saveCert(self, trustedDomainDict):

Callers 2

BaiduSubdomainFunction · 0.80
BingSubdomainFunction · 0.80

Calls 1

saveMethod · 0.80

Tested by

no test coverage detected