Commit d6ea9dcb authored by Charles刘佳佳's avatar Charles刘佳佳

fixed:百科元素class名称改动拉取异常修复

parent 705c1d32
......@@ -24,7 +24,7 @@ def GetBaiduCompany(playwright: Playwright) -> int:
crawler.Log(name + "-百度开始请求数据:" + url)
page.goto(url)
all_summary = page.locator(".lemma-summary").all_text_contents()
all_summary = page.locator('div[class^="lemmaSummary"]').all_text_contents()
intro = re.sub(r'\[[\d-]+\]', '', str(all_summary))
crawler.Log(name + "-获取到百度数据:" + intro)
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment