MCPcopy
hub / github.com/lining0806/PythonSpiderNotes / StringListSave

Function StringListSave

NewsSpider/NewsSpider.py:10–16  ·  view source on GitHub ↗
(save_path, filename, slist)

Source from the content-addressed store, hash-verified

8
9
10def StringListSave(save_path, filename, slist):
11 if not os.path.exists(save_path):
12 os.makedirs(save_path)
13 path = save_path+"/"+filename+".txt"
14 with open(path, "w+") as fp:
15 for s in slist:
16 fp.write("%s\t\t%s\n" % (s[0].encode("utf8"), s[1].encode("utf8")))
17
18def Page_Info(myPage):
19 '''Regex'''

Callers 1

SpiderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected