MCPcopy
hub / github.com/talebook/talebook / visit_thread

Function visit_thread

tools/spider.py:59–75  ·  view source on GitHub ↗
(tid, name)

Source from the content-addressed store, hash-verified

57
58
59def visit_thread(tid, name):
60 path = "/read-htm-tid-%s.html" % tid
61 if path in done_urls:
62 logging.info(" skip %-30s %s" % (path, name))
63 return
64 else:
65 logging.info("Visit %-30s %s" % (path, name))
66 done_urls.add(path)
67 rsp = get(path)
68 attchments = re.findall(re_attchment, rsp.text)
69 if not attchments:
70 logging.error("No attachment in %s" % path)
71 return
72 for path, name in attchments:
73 for f in formats:
74 if name.endswith(f):
75 download(path, name)
76
77
78def visit_board():

Callers 1

visit_boardFunction · 0.85

Calls 3

getFunction · 0.70
downloadFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected