Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 94e34f4

Browse files
committed
fix : 不能正确抓取答案
1 parent a72b6fb commit 94e34f4

File tree

7 files changed

+2
-1
lines changed

7 files changed

+2
-1
lines changed
5.05 KB
Binary file not shown.
15.7 KB
Binary file not shown.
1.86 KB
Binary file not shown.
3.33 KB
Binary file not shown.
13.7 KB
Binary file not shown.
3.08 KB
Binary file not shown.

my_xxt/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,9 @@ def getAnswer(self, work_url: str, ) -> list:
372372
"User-Agent": self.header,
373373
},
374374
)
375+
375376
work_view_soup = BeautifulSoup(work_answer_view.text, "lxml")
376-
work_view = work_view_soup.find_all("div", attrs={"class": "marBom60 questionLi"})
377+
work_view = work_view_soup.find_all("div", attrs={"class": "marBom60 questionLi singleQuesId"})
377378
_answer_type = AnswerType()
378379
for item in work_view:
379380
title_type = item.find_next("span").string.split(",")[0].replace("(", "").replace(")", "")

0 commit comments

Comments
 (0)