MCPcopy Index your code
hub / github.com/lining0806/PythonSpiderNotes / Page_Info

Function Page_Info

NewsSpider/NewsSpider.py:18–21  ·  view source on GitHub ↗

Regex

(myPage)

Source from the content-addressed store, hash-verified

16 fp.write("%s\t\t%s\n" % (s[0].encode("utf8"), s[1].encode("utf8")))
17
18def Page_Info(myPage):
19 '''Regex'''
20 mypage_Info = re.findall(r'<div class="titleBar" id=".*?"><h2>(.*?)</h2><div class="more"><a href="(.*?)">.*?</a></div></div>', myPage, re.S)
21 return mypage_Info
22
23def New_Page_Info(new_page):
24 '''Regex(slowly) or Xpath(fast)'''

Callers 1

SpiderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected